Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp31697pxb; Tue, 12 Apr 2022 15:59:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8jvwKWuab3dJullWzqM0QhKiESpAMuY29EM9ooEMSaQQ95XPLr1ubUUlHNTycwni6Vp99 X-Received: by 2002:a05:6a00:2349:b0:4fa:934f:f6db with SMTP id j9-20020a056a00234900b004fa934ff6dbmr40048522pfj.44.1649804394892; Tue, 12 Apr 2022 15:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649804394; cv=none; d=google.com; s=arc-20160816; b=S3zHaAS3n3vg28srFDfV2hzNt06gRD36UQA2cMH2q8pdVuwKmeuvebMt5t8n6y58LI G0k+XvipwomOFZUA42MutmLuJRyGIGqS3c2N9QWbB6IuupmHvYILrlO7Wmq9AhM5oq4V gSq7KYwXhmmZcOjT7f/d5PbrzesqWGK0hXUFgShCdh3yb4sFmgGrVKJb6faA5936XzCK mdkkS8iIIsp5BXiitzicG4H1TCr5P0xSSIdOi6Rr3FPBmXqA5xVA83IIBSSDD44Ch9lj 6sI0V14NIflED95JAcwcaySSqAi5aQqmcZfS+SeX5IPCU0DGyEYkmzrk7Ta9fj2Tcadv 1QpQ== 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=rjDKvl0QJwzpRT2o2XZZ9oQTT05ltUTl1PFT1gC53tA=; b=CIOrFQ12qn1Cm9uLdrbVartGvdabayWXAVcQRGNwQb7opLPJw8pPyyI+QPQ8S7c9UV I82P6x0GRHBWcSzSQT90zTK/RokM9RWrzD4/jyz+uFKrHhaGqIgmnJj0zzC33WowzHco y2k721ZgaTKS7wPFMle+RIjP4Qx2IDsuOnjI5SHIYBeWNwNr4eQIEqDmMO6OrLOz0k/N ExeLKUvmEaDoznLCk1H39pMsQkU9nZMlS+0vzItFfxFp+pUKiTORzHjJZKjWijEq9r3p AMJRuHN5KIxpH6IDqK78ipVF9rL7Ml9F2Tcw25a8/dSuiiShlXl9qcq58vJ2uDOqegSc GdLA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g187-20020a636bc4000000b0039d8ab91927si3801896pgc.416.2022.04.12.15.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:59:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4754F1DBA83; Tue, 12 Apr 2022 14:41:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346190AbiDKMvK (ORCPT + 99 others); Mon, 11 Apr 2022 08:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235615AbiDKMvJ (ORCPT ); Mon, 11 Apr 2022 08:51:09 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07E129C87; Mon, 11 Apr 2022 05:48:54 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R991e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0V9qAczp_1649681329; Received: from 30.225.24.83(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V9qAczp_1649681329) by smtp.aliyun-inc.com(127.0.0.1); Mon, 11 Apr 2022 20:48:50 +0800 Message-ID: <542f749c-b0f1-1de6-cb41-26e296afb2df@linux.alibaba.com> Date: Mon, 11 Apr 2022 20:48:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v8 04/20] cachefiles: notify user daemon when withdrawing cookie Content-Language: en-US To: David Howells Cc: linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, willy@infradead.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org, luodaowen.backend@bytedance.com, tianzichen@kuaishou.com, fannaihao@baidu.com References: <20220406075612.60298-5-jefflexu@linux.alibaba.com> <20220406075612.60298-1-jefflexu@linux.alibaba.com> <1091405.1649680508@warthog.procyon.org.uk> From: JeffleXu In-Reply-To: <1091405.1649680508@warthog.procyon.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 On 4/11/22 8:35 PM, David Howells wrote: > Jeffle Xu wrote: > >> +static int init_close_req(struct cachefiles_req *req, void *private) > > "cachefiles_" prefix please. Okay. > >> + /* >> + * It's possible if the cookie looking up phase failed before READ >> + * request has ever been sent. >> + */ > > What "it" is possible? You might want to say "It's possible that the > cookie..." "It's possible that the following if (fd == 0) condition is triggered when cookie looking up phase failed before READ request has ever been sent." Anyway I will fix this comment then. > >> + if (fd == 0) >> + return -ENOENT; > > 0 is a valid fd. Yeah, but IMHO fd 0 is always for stdin? I think the allocated anon_fd won't install at fd 0. Please correct me if I'm wrong. In fact I wanna use "fd == 0" as the initial state as struct cachefiles_object is allocated with kmem_cache_zalloc(). -- Thanks, Jeffle