]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: use IS_ROOT not DCACHE_DISCONNECTED
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 15 Oct 2013 21:03:16 +0000 (17:03 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 28 Oct 2013 23:19:19 +0000 (19:19 -0400)
commitec5c2eb0439f24b1875787a2546e60ed76cc5815
tree0e360753066b9dc61df85b2c5234f544ff418527
parent126f51415b9bcda566bd86308acaa294a592cfbc
nfs: use IS_ROOT not DCACHE_DISCONNECTED

This check was added by Al Viro with
bb7c081f5f7bc5a7859fc10a7171bf4ff645b711 "nfs d_revalidate() is too
trigger-happy with d_drop()", with the explanation that we don't want to
remove the root of a disconnected tree, which will still be included on
the s_anon list.

But DCACHE_DISCONNECTED does *not* actually identify dentries that are
disconnected from the dentry tree or hashed on s_anon.  IS_ROOT() is the
way to do that.

Also add a comment from Al's commit to remind us why this check is
there.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c