summaryrefslogtreecommitdiff
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-09-05 13:44:44 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-06 00:23:54 +0400
commit46ea1562da792a94ee8391f7aed882eb7771e18c (patch)
tree85d07b496e8331a681ced20159bbd39ad9188e5d /fs/fuse/dir.c
parente2a6b95236eba5341253a2e4a50946355f887303 (diff)
downloadlinux-46ea1562da792a94ee8391f7aed882eb7771e18c.tar.xz
fuse: drop dentry on failed revalidate
Drop a subtree when we find that it has moved or been delated. This can be done as long as there are no submounts under this location. If the directory was moved and we come across the same directory in a future lookup it will be reconnected by d_materialise_unique(). Signed-off-by: Anand Avati <avati@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 25c6cfe98801..0e6961aae6c0 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -259,6 +259,8 @@ out:
invalid:
ret = 0;
+ if (check_submounts_and_drop(entry) != 0)
+ ret = 1;
goto out;
}