Commit 46ea1562 authored by Anand Avati's avatar Anand Avati Committed by Al Viro

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: default avatarAnand Avati <avati@redhat.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e2a6b952
...@@ -259,6 +259,8 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags) ...@@ -259,6 +259,8 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
invalid: invalid:
ret = 0; ret = 0;
if (check_submounts_and_drop(entry) != 0)
ret = 1;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment