Re: [PATCH 10/13] VFS/namei: handle LOOKUP_RCU in page_follow_link_light.

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

 



On Fri, Mar 20, 2015 at 09:38:33AM +1100, NeilBrown wrote:

> Ahhh - that's what nd->inode is for.  I wondered.
> 
> Am I correct in thinking that dentry->d_inode can only become NULL - it cannot
> then become some other inode?

It can - consider somebody doing mkdir on that name right under you.
_All_ we are guaranteed is that at some moment nd->inode matched the
pathname this far and so was (at the same moment) path->dentry.  We
are not promised that these inode and dentry will remain associated
with each other, etc.

We ought to check ->d_seq after checking ->d_flags, BTW.  _That_ will confirm
that inode remained corresponding to that dentry until the time we'd
observed d_is_symlink(dentry), i.e. make sure that inode *is* a symlink one.

And yes, we probably would have to pass dentry and inode separately, more's
the pity.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux