Skip to content

Commit

Permalink
fuse: drop dentry on failed revalidate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anand Avati authored and Al Viro committed Sep 5, 2013
1 parent e2a6b95 commit 46ea156
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 46ea156

Please sign in to comment.