diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-10-16 21:20:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 00:16:37 -0500 |
commit | e4b70ebeeba954cb9cbcf0f19016bb9c2b8711c1 (patch) | |
tree | cb2f04bd4e8b23fcd5d94235f310c95b472253ac /fs/exportfs | |
parent | a056cc8934c7bd046dc44af559bba163115fde40 (diff) |
exportfs: eliminate unused "noprogress" counter
Note this counter is now being set to 0 on every pass through the loop,
so it no longer serves any useful purpose.
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 | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 6b5ddd5492bc..d8ba88ac10e5 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -145,18 +145,9 @@ static void clear_disconnected(struct dentry *dentry) | |||
145 | static int | 145 | static int |
146 | reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) | 146 | reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) |
147 | { | 147 | { |
148 | int noprogress = 0; | ||
149 | int err = -ESTALE; | 148 | int err = -ESTALE; |
150 | 149 | ||
151 | /* | 150 | while (target_dir->d_flags & DCACHE_DISCONNECTED) { |
152 | * It is possible that a confused file system might not let us complete | ||
153 | * the path to the root. For example, if get_parent returns a directory | ||
154 | * in which we cannot find a name for the child. While this implies a | ||
155 | * very sick filesystem we don't want it to cause knfsd to spin. Hence | ||
156 | * the noprogress counter. If we go through the loop 10 times (2 is | ||
157 | * probably enough) without getting anywhere, we just give up | ||
158 | */ | ||
159 | while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) { | ||
160 | struct dentry *pd = find_disconnected_root(target_dir); | 151 | struct dentry *pd = find_disconnected_root(target_dir); |
161 | 152 | ||
162 | BUG_ON(pd == mnt->mnt_sb->s_root); | 153 | BUG_ON(pd == mnt->mnt_sb->s_root); |
@@ -230,9 +221,7 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) | |||
230 | */ | 221 | */ |
231 | dput(npd); | 222 | dput(npd); |
232 | dput(ppd); | 223 | dput(ppd); |
233 | if (npd == pd) | 224 | if (npd != pd) |
234 | noprogress = 0; | ||
235 | else | ||
236 | goto out_reconnected; | 225 | goto out_reconnected; |
237 | if (IS_ROOT(pd)) { | 226 | if (IS_ROOT(pd)) { |
238 | /* something went wrong, we have to give up */ | 227 | /* something went wrong, we have to give up */ |