Skip to content

Commit

Permalink
exportfs: more detailed comment for path_reconnect
Browse files Browse the repository at this point in the history
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
J. Bruce Fields authored and Al Viro committed Nov 9, 2013
1 parent 854ff5c commit 78cee9a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion fs/exportfs/expfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,19 @@ find_disconnected_root(struct dentry *dentry)
/*
* Make sure target_dir is fully connected to the dentry tree.
*
* It may already be, as the flag isn't always updated when connection happens.
* On successful return, DCACHE_DISCONNECTED will be cleared on
* target_dir, and target_dir->d_parent->...->d_parent will reach the
* root of the filesystem.
*
* Whenever DCACHE_DISCONNECTED is unset, target_dir is fully connected.
* But the converse is not true: target_dir may have DCACHE_DISCONNECTED
* set but already be connected. In that case we'll verify the
* connection to root and then clear the flag.
*
* Note that target_dir could be removed by a concurrent operation. In
* that case reconnect_path may still succeed with target_dir fully
* connected, but further operations using the filehandle will fail when
* necessary (due to S_DEAD being set on the directory).
*/
static int
reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
Expand Down

0 comments on commit 78cee9a

Please sign in to comment.