Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp436642rwe; Wed, 24 Aug 2022 03:45:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR73B5w3FVJUBE1E8IjZ9xIFnJkdYEd+7z9t82d2bGfh25s7Z3I5+W6LAsKNFj3xGeh/febQ X-Received: by 2002:a17:903:2345:b0:16f:1f3:1ade with SMTP id c5-20020a170903234500b0016f01f31ademr29348080plh.106.1661337907987; Wed, 24 Aug 2022 03:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661337907; cv=none; d=google.com; s=arc-20160816; b=SVCpEdZaGjU66QbskpFrWjtLWnWih44FYcKKhwyY9Xvfq38hcg9+hD7rkC4o77XyIB Mwvb18Gqw5LvZdEnaPbh31ErTJXlesyFO6aITr6G89ClhLw8GWKXVCO5XGotncxvP0Ip 6yBCjAoBemw1N6bNo9EsNciJV2BL3LiOy4/Z8xcNvUlnKTvdG7byp8Uv86b1W8Sg4s7W 5JR4jP5CabTJ122EIgCt6+amazkDqJRlxzLavOKbmqY/nDSuHbwNgJyLDZfuew467gAV zeWHlnOyXVFwI2SqdkE8zROh4HsNvJIcm01Tg60AYGMBV7eBBp36XxvgaRNmuohJSFa0 PdqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=VPCYtTaUZWpL796MsnlJYTznsS4pYxjYV+Pv2KRlCtI=; b=i+tL4vHV7ajBMy/VM9GxPcN6FULK+BhOFU2Yo+ntx98pGP8Ab5sEPVHyjZXx1lSY9u eEwM+0FFaY0wjovPqFCPr4RSQZOKrdbDPQc8CWit1cBwrzdq+Iw5iSHWSViwPqVe1aJJ dBmyEdCvLEz+Zauzv3CM45iDKm6VkE6+xfJ3oec7ywvx3FD6Q7nomvOF/lln4pjFD6H4 YUvEr14D5gyeg98gjWB4MyRgCkgAYEJ7vI9p5gUMia/L5Ef9R4oJ7b2wvW8hPlvwNVA0 APgPjiS6tgRMJ6U7MEM9C5/0NLQnN0pDL1wKb/gHJExTblQP8/+Bhhf4e0gXVxcYgYgn VY9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EyeY3Uuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a056a00178f00b0052ce1c44bfesi19801560pfg.318.2022.08.24.03.44.56; Wed, 24 Aug 2022 03:45:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EyeY3Uuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236738AbiHXKTh (ORCPT + 99 others); Wed, 24 Aug 2022 06:19:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbiHXKT3 (ORCPT ); Wed, 24 Aug 2022 06:19:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769A775FD4 for ; Wed, 24 Aug 2022 03:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661336367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VPCYtTaUZWpL796MsnlJYTznsS4pYxjYV+Pv2KRlCtI=; b=EyeY3UukD9gOBM9bHAPCCHTjyPMvB82s1huRZAUS6ROrR3pCRrL3W87ZMpQ6A6cssLqi3C i/rHkEHz2YVKS6V0PI9VyfOvB0kvXCRb5BbS4pQEl4t68wyWV0cJu68S/PY3ymeEvozPWW gBnASNeCj6kxYc39bNHHMB4Gr48J2yU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-363-5WK-AnyhMUS1qtFcUUl9XA-1; Wed, 24 Aug 2022 06:19:25 -0400 X-MC-Unique: 5WK-AnyhMUS1qtFcUUl9XA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E95E185A599; Wed, 24 Aug 2022 10:19:24 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2D8418ECC; Wed, 24 Aug 2022 10:19:23 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20220818125038.2247720-1-sunke32@huawei.com> References: <20220818125038.2247720-1-sunke32@huawei.com> To: Sun Ke Cc: dhowells@redhat.com, linux-cachefs@redhat.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-fsdevel@vger.kernel.org, jefflexu@linux.alibaba.com Subject: Re: [PATCH v3] cachefiles: fix error return code in cachefiles_ondemand_copen() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3700078.1661336363.1@warthog.procyon.org.uk> Date: Wed, 24 Aug 2022 11:19:23 +0100 Message-ID: <3700079.1661336363@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org /* fail OPEN request if copen format is invalid */ ret = kstrtol(psize, 0, &size); if (ret) { req->error = ret; goto out; } /* fail OPEN request if daemon reports an error */ if (size < 0) { if (!IS_ERR_VALUE(size)) ret = size = -EINVAL; req->error = size; goto out; } Should ret get set to the error in size? David