Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1282099rwe; Thu, 25 Aug 2022 20:54:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR709IsUKqDYxvEzthkLRxkjYHdzQUwv7FPCaB01YCAbd1THpjYHzTZWaNmY6UAKrCIEPrwP X-Received: by 2002:a05:6402:28cb:b0:43b:c6d7:ef92 with SMTP id ef11-20020a05640228cb00b0043bc6d7ef92mr5381335edb.333.1661486065058; Thu, 25 Aug 2022 20:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661486065; cv=none; d=google.com; s=arc-20160816; b=oT4+b6TF3Y2nDw//HyeMQK1AFcVHOONr2GLiZc2B6gFB13DirIP/GfaQBPEUdFm2TG yfAqa5skiNjnVTJF6K7ZuWd/tKiygzyjZmM8QJHbJShj5SS1nvOAlbiUKnQlxXm9eb9y E+dZJTzabPsnyra+rpicREr4LyvPQv9gSRfz1RNbERIt9xY1tTrork7hRA6ppcoGylbH suC0/vWQeY6rhijjdih18X6Y+HXB7GXHiVDY5u0C9mFNDji7HdSV2xw2cZ4R393lQKZd J26w8LZebDN1AM+Wm/7vr7cAHxPMKbdh8FW6LylB87BO3cjbk0qJW8j9BltIBdI7bfGa YVIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=ewvyXlAo1q8Sp2kV3DvacDNmPbkIytjUAI93EWReots=; b=mnqrX6t20nq091Vy0hgN3Sam/bbPGjSmW6NOhN3rGK2kl926OVa0UORLr+SFEa4d0p 6PlRP/WJUJ5/5buwUTYGj6upSPIZLzdbmMVfjN9JgbGXBRwae7oE/PnjOYmmq8PlUNKO FVPEGjHYpURhMSo+YxiFIK/cF44Joej8jkUFfmJBjnmUrXurYWIcELbcVhIMoedFCsSy GLhWGYlK85vgddTfej3luvALgFhVmtcEev5cFLxmToYcPIXFhYToHYsOyZCUCxUICUS+ RoNwtEDJ0vcdZMrnyTYp8FPbxamUx4Z1Q8EVRy7g0L5eaVt4pFdh+OjE33ltbjvKa10W VCsw== 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 qa10-20020a170907868a00b007308396d8eesi602440ejc.780.2022.08.25.20.53.59; Thu, 25 Aug 2022 20:54:25 -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 S244189AbiHZDeJ (ORCPT + 99 others); Thu, 25 Aug 2022 23:34:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiHZDeH (ORCPT ); Thu, 25 Aug 2022 23:34:07 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE638CE461; Thu, 25 Aug 2022 20:34:04 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VNHIe3G_1661484839; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VNHIe3G_1661484839) by smtp.aliyun-inc.com; Fri, 26 Aug 2022 11:34:01 +0800 Date: Fri, 26 Aug 2022 11:33:59 +0800 From: Gao Xiang 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, dan.carpenter@oracle.com Subject: Re: [PATCH v4] cachefiles: fix error return code in cachefiles_ondemand_copen() Message-ID: Mail-Followup-To: Sun Ke , 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, dan.carpenter@oracle.com References: <20220826023515.3437469-1-sunke32@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220826023515.3437469-1-sunke32@huawei.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,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 Fri, Aug 26, 2022 at 10:35:15AM +0800, Sun Ke wrote: > The cache_size field of copen is specified by the user daemon. > If cache_size < 0, then the OPEN request is expected to fail, > while copen itself shall succeed. However, returning 0 is indeed > unexpected when cache_size is an invalid error code. > > Fix this by returning error when cache_size is an invalid error code. > > Fixes: c8383054506c ("cachefiles: notify the user daemon when looking up cookie") > Signed-off-by: Sun Ke > Suggested-by: Jeffle Xu > Suggested-by: Dan Carpenter Reviewed-by: Gao Xiang Thanks, Gao Xiang