Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp335810rwb; Thu, 18 Aug 2022 04:55:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6g0D19T3tO9xCAdBvAPMbak4A6ti1LW4KLLxt7eFgSv+dpSz3D8Z/Htbo4qQ0XKaZAx8UA X-Received: by 2002:a17:902:e744:b0:16e:f6c2:3731 with SMTP id p4-20020a170902e74400b0016ef6c23731mr2353004plf.104.1660823711074; Thu, 18 Aug 2022 04:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660823711; cv=none; d=google.com; s=arc-20160816; b=sB6EWCcH+2vio0g+s9pM7pQC1Pf7pbihftJx7yzEXkPdg9mNsyhZkxW6tIf9VJ4l3T uFr2fIU6dCML0sicrcaLxXLHzwxGTdbH/Nr2pMKbOKUCpTsc+X83tXHIK1ulC7Brl1B8 uVTYfge9gqlG5XusCA4gle/o43CKeOi08KOG26YKAMNy+kAtlKyd8EhHz7HYJnszmPBo GH4Xox78mLxW2a8QDD4wYMWB6ulPNuzrJWk4RNGWZwpP67PR2rCLmLAzKc0elHwt4p1k f1Wj+bCL9VjFJExScxA5rjU3W6sblAZ/lZN4Lg2BxHRLVVuD5PJcUVfG/NwmDwuuJ2RK glmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ymw2HCTHZy9fnMxNQc/yybwte4aihuSasbwuNaBCTrE=; b=ahiI3C0GARXaJ0YIDLaGC/MVy0675GmVu0pL5okUxcwjECuG2wY0hFSAigGI9MuwxU NS7HXXoboelA/SCVRKpR65CdziYADoOv4xmW4f+QGEGXKZzhpCKigcvlVgssfwffR0nX 7tz9iYkuLCZ0lzwo+po5jbdgFMj3CTsm25bLhHoj+/U+M+HUol06Vo9Ne9A7mWbMBL3X 5BptpNm4su2FidYIRkdHzg0hzQfG51RjysYHhICsXTgaCLC0SE4s7nOEOe7dUtgbViyq jlLXRiQEoX0ukxKSSLN2BaUwCnel/uq+/xktoyQSS8+AQPl+mTylRVNWc51hN5maZ/aR 5xmw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020a17090a529600b001fac0067454si2479283pjh.16.2022.08.18.04.54.59; Thu, 18 Aug 2022 04:55:11 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244355AbiHRLOd (ORCPT + 99 others); Thu, 18 Aug 2022 07:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244344AbiHRLOa (ORCPT ); Thu, 18 Aug 2022 07:14:30 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C5CE422E0; Thu, 18 Aug 2022 04:14:28 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VMaUvrM_1660821265; Received: from 30.227.66.106(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VMaUvrM_1660821265) by smtp.aliyun-inc.com; Thu, 18 Aug 2022 19:14:26 +0800 Message-ID: Date: Thu, 18 Aug 2022 19:14:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [v2] cachefiles: fix error return code in cachefiles_ondemand_copen() Content-Language: en-US To: Sun Ke , dhowells@redhat.com Cc: linux-cachefs@redhat.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, "linux-fsdevel@vger.kernel.org" References: <20220818111935.1683062-1-sunke32@huawei.com> From: JeffleXu In-Reply-To: <20220818111935.1683062-1-sunke32@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 On 8/18/22 7:19 PM, Sun Ke wrote: > If size < 0; open request will fail, but cachefiles_ondemand_copen return 0. > Fix to return a negative error code. Could you please also update the commit log? Otherwise LGTM. Reviewed-by: Jingbo Xu BTW, also cc linux-fsdevel@vger.kernel.org > > Fixes: c8383054506c ("cachefiles: notify the user daemon when looking up cookie") > Signed-off-by: Sun Ke > --- > fs/cachefiles/ondemand.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/cachefiles/ondemand.c b/fs/cachefiles/ondemand.c > index 1fee702d5529..ea8a1e8317d9 100644 > --- a/fs/cachefiles/ondemand.c > +++ b/fs/cachefiles/ondemand.c > @@ -159,7 +159,7 @@ int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args) > /* fail OPEN request if daemon reports an error */ > if (size < 0) { > if (!IS_ERR_VALUE(size)) > - size = -EINVAL; > + ret = size = -EINVAL; > req->error = size; > goto out; > } -- Thanks, Jingbo