diff options
| author | J. Bruce Fields <bfields@redhat.com> | 2013-10-22 20:59:19 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 00:16:35 -0500 |
| commit | 78cee9a8e4b42b3f585ea3bd1c076f5a76fee722 (patch) | |
| tree | ebd38a5243871c32493a9f36e71b3a2fab2e86d7 /fs/exportfs | |
| parent | 854ff5caabb5974b7464b438aba0bc47f1b6cf34 (diff) | |
exportfs: more detailed comment for path_reconnect
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exportfs')
| -rw-r--r-- | fs/exportfs/expfs.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 6d0a7fa9abb3..87e6dca69e43 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
| @@ -93,7 +93,19 @@ find_disconnected_root(struct dentry *dentry) | |||
| 93 | /* | 93 | /* |
| 94 | * Make sure target_dir is fully connected to the dentry tree. | 94 | * Make sure target_dir is fully connected to the dentry tree. |
| 95 | * | 95 | * |
| 96 | * It may already be, as the flag isn't always updated when connection happens. | 96 | * On successful return, DCACHE_DISCONNECTED will be cleared on |
| 97 | * target_dir, and target_dir->d_parent->...->d_parent will reach the | ||
| 98 | * root of the filesystem. | ||
| 99 | * | ||
| 100 | * Whenever DCACHE_DISCONNECTED is unset, target_dir is fully connected. | ||
| 101 | * But the converse is not true: target_dir may have DCACHE_DISCONNECTED | ||
| 102 | * set but already be connected. In that case we'll verify the | ||
| 103 | * connection to root and then clear the flag. | ||
| 104 | * | ||
| 105 | * Note that target_dir could be removed by a concurrent operation. In | ||
| 106 | * that case reconnect_path may still succeed with target_dir fully | ||
| 107 | * connected, but further operations using the filehandle will fail when | ||
| 108 | * necessary (due to S_DEAD being set on the directory). | ||
| 97 | */ | 109 | */ |
| 98 | static int | 110 | static int |
| 99 | reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) | 111 | reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) |
