Skip to contentSkip to conversation

do_remount(): pull touch_mnt_namespace() up

PATCH In review Al Viro 1 participant 1 message Oct 3, 2013 VFS

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 4/17 do_remount(): pull touch_mnt_namespace() up

... and don't bother with dropping and regaining vfsmount_lock

---
 fs/namespace.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
fs/namespace.c +1 -5
index 09a255d..41663dd 100644
@@ -1849,14 +1849,10 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
 		br_write_lock(&vfsmount_lock);
 		mnt_flags |= mnt->mnt.mnt_flags & MNT_PROPAGATION_MASK;
 		mnt->mnt.mnt_flags = mnt_flags;
-		br_write_unlock(&vfsmount_lock);
-	}
-	up_write(&sb->s_umount);
-	if (!err) {
-		br_write_lock(&vfsmount_lock);
 		touch_mnt_namespace(mnt->mnt_ns);
 		br_write_unlock(&vfsmount_lock);
 	}
+	up_write(&sb->s_umount);
 	return err;
 }
 
Signature · 1 line
1.7.2.5