[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <542f749c-b0f1-1de6-cb41-26e296afb2df@linux.alibaba.com>
Date: Mon, 11 Apr 2022 20:48:49 +0800
From: JeffleXu <jefflexu@...ux.alibaba.com>
To: David Howells <dhowells@...hat.com>
Cc: linux-cachefs@...hat.com, xiang@...nel.org, chao@...nel.org,
linux-erofs@...ts.ozlabs.org, torvalds@...ux-foundation.org,
gregkh@...uxfoundation.org, willy@...radead.org,
linux-fsdevel@...r.kernel.org, joseph.qi@...ux.alibaba.com,
bo.liu@...ux.alibaba.com, tao.peng@...ux.alibaba.com,
gerry@...ux.alibaba.com, eguan@...ux.alibaba.com,
linux-kernel@...r.kernel.org, luodaowen.backend@...edance.com,
tianzichen@...ishou.com, fannaihao@...du.com
Subject: Re: [PATCH v8 04/20] cachefiles: notify user daemon when withdrawing
cookie
On 4/11/22 8:35 PM, David Howells wrote:
> Jeffle Xu <jefflexu@...ux.alibaba.com> 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
Powered by blists - more mailing lists