OSDN Git Service

fuse: drop dentry on failed revalidate
authorAnand Avati <avati@redhat.com>
Thu, 5 Sep 2013 09:44:44 +0000 (11:44 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 5 Sep 2013 20:23:54 +0000 (16:23 -0400)
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>
fs/fuse/dir.c

index 25c6cfe..0e6961a 100644 (file)
@@ -259,6 +259,8 @@ out:
 
 invalid:
        ret = 0;
+       if (check_submounts_and_drop(entry) != 0)
+               ret = 1;
        goto out;
 }