[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150319234625.GT29656@ZenIV.linux.org.uk>
Date: Thu, 19 Mar 2015 23:46:28 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: NeilBrown <neilb@...e.de>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/13] VFS/namei: handle LOOKUP_RCU in
page_follow_link_light.
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists