[PATCH 4/5] exportfs: slight reorganization of reconnect loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "J. Bruce Fields" <bfields@xxxxxxxxxx>

Just cleanup, no change in functionality

Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
---
 fs/exportfs/expfs.c |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 24fb763..afa7c9c 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -208,19 +208,23 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
 			/* must have found a connected parent - great */
 			clear_disconnected(target_dir);
 			noprogress = 0;
-		} else if (dentry == mnt->mnt_sb->s_root) {
+			dput(dentry);
+			continue;
+		}
+		if (dentry == mnt->mnt_sb->s_root) {
 			printk(KERN_ERR "export: Eeek filesystem root is not connected, impossible\n");
 			clear_disconnected(target_dir);
 			noprogress = 0;
-		} else {
-			/*
-			 * We have hit the top of a disconnected path, try to
-			 * find parent and connect.
-			 */
-			err = reconnect_one(mnt, dentry, nbuf, &noprogress);
-			if (err)
-				return err;
+			dput(dentry);
+			continue;
 		}
+		/*
+		 * We have hit the top of a disconnected path, try to
+		 * find parent and connect.
+		 */
+		err = reconnect_one(mnt, dentry, nbuf, &noprogress);
+		if (err)
+			return err;
 		dput(dentry);
 	}
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux