summaryrefslogtreecommitdiff
path: root/fs/exportfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exportfs')
-rw-r--r--fs/exportfs/expfs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 51bdc5cab069..80246bad1b7f 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -280,13 +280,14 @@ static int get_name(struct vfsmount *mnt, struct dentry *dentry,
int old_seq = buffer.sequence;
error = vfs_readdir(file, filldir_one, &buffer);
+ if (buffer.found) {
+ error = 0;
+ break;
+ }
if (error < 0)
break;
- error = 0;
- if (buffer.found)
- break;
error = -ENOENT;
if (old_seq == buffer.sequence)
break;