From 88e537993d9866a09924436d0576f3a907c88b01 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 5 Sep 2013 11:44:44 +0200 Subject: [PATCH] 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 --- fs/fuse/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 25c6cfe988010..0e6961aae6c02 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; } -- 2.39.5