Skip to content

Commit 3ccb354

Browse files
ebiedermAl Viro
authored andcommitted
vfs: Document the effect of d_revalidate on d_find_alias
d_drop or check_submounts_and_drop called from d_revalidate can result in renamed directories with child dentries being unhashed. These renamed and drop directory dentries can be rehashed after d_materialise_unique uses d_find_alias to find them. Reviewed-by: Miklos Szeredi <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 9ea459e commit 3ccb354

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/dcache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,8 @@ EXPORT_SYMBOL(dget_parent);
761761
* acquire the reference to alias and return it. Otherwise return NULL.
762762
* Notice that if inode is a directory there can be only one alias and
763763
* it can be unhashed only if it has no children, or if it is the root
764-
* of a filesystem.
764+
* of a filesystem, or if the directory was renamed and d_revalidate
765+
* was the first vfs operation to notice.
765766
*
766767
* If the inode has an IS_ROOT, DCACHE_DISCONNECTED alias, then prefer
767768
* any other hashed alias over that one.

0 commit comments

Comments
 (0)