Re: [PATCH RFC] NFSD: Bump the ref count on nf_inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jul 7, 2022, at 1:12 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> 
> On Thu, 2022-07-07 at 17:01 +0000, Chuck Lever III wrote:
>> 
>>> On Jul 7, 2022, at 12:59 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
>>> 
>>> One other spot. We also dereference it in nfsd_file_mark_find_or_create,
>>> but I think that specific instance is OK. We know that we still hold a
>>> reference to the inode at that point since it comes from fhp->fh_dentry,
>>> so we shouldn't need to worry about it disappearing out from under us.
>> 
>> Needs some annotation. I would prefer not to get that pointer from
>> nf_inode, then. As your comment says: compare only, never deref.
>> 
>> 
> 
> Yeah, maybe we should pass in the inode as a separate parameter to that
> function?

That's what I ended up doing, that seems most clear.


--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux