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>
This commit is contained in:
Anand Avati 2013-09-05 11:44:44 +02:00 committed by Al Viro
parent e2a6b95236
commit 46ea1562da

View file

@ -259,6 +259,8 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
invalid:
ret = 0;
if (check_submounts_and_drop(entry) != 0)
ret = 1;
goto out;
}