Skip to content

Commit 46ea156

Browse files
avatiAl Viro
authored andcommitted
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>
1 parent e2a6b95 commit 46ea156

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/fuse/dir.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
259259

260260
invalid:
261261
ret = 0;
262+
if (check_submounts_and_drop(entry) != 0)
263+
ret = 1;
262264
goto out;
263265
}
264266

0 commit comments

Comments
 (0)