From: Anand Avati Date: Thu, 5 Sep 2013 09:44:44 +0000 (+0200) Subject: fuse: drop dentry on failed revalidate X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=46ea1562da792a94ee8391f7aed882eb7771e18c;p=linux-beck.git 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 Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro --- 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; }