@@ -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);
}