Skip to contentSkip to conversation

dup_mnt_ns(): get rid of pointless grabbing of vfsmount_lock

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

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 3/17 dup_mnt_ns(): get rid of pointless grabbing of vfsmount_lock

mnt_list is protected by namespace_sem, not vfsmount_lock

---
 fs/namespace.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
fs/namespace.c +0 -2
index f6b7010..09a255d 100644
@@ -2444,9 +2444,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns,
 		return ERR_CAST(new);
 	}
 	new_ns->root = new;
-	br_write_lock(&vfsmount_lock);
 	list_add_tail(&new_ns->list, &new->mnt_list);
-	br_write_unlock(&vfsmount_lock);
 
 	/*
 	 * Second pass: switch the tsk->fs->* elements and mark new vfsmounts
Signature · 1 line
1.7.2.5