[PATCH] mnt_expire is protected by namespace_sem, no need for vfsmount_lock

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 6758f953 c35038be

+2 -9
+2 -9
fs/namespace.c
··· 262 /* stick the duplicate mount on the same expiry list 263 * as the original if that was on one */ 264 if (flag & CL_EXPIRE) { 265 - spin_lock(&vfsmount_lock); 266 if (!list_empty(&old->mnt_expire)) 267 list_add(&mnt->mnt_expire, &old->mnt_expire); 268 - spin_unlock(&vfsmount_lock); 269 } 270 } 271 return mnt; ··· 1125 if (err) 1126 goto out1; 1127 1128 - spin_lock(&vfsmount_lock); 1129 /* if the mount is moved, it should no longer be expire 1130 * automatically */ 1131 list_del_init(&old_nd.path.mnt->mnt_expire); 1132 - spin_unlock(&vfsmount_lock); 1133 out1: 1134 mutex_unlock(&nd->path.dentry->d_inode->i_mutex); 1135 out: ··· 1194 if ((err = graft_tree(newmnt, nd))) 1195 goto unlock; 1196 1197 - if (fslist) { 1198 - /* add to the specified expiration list */ 1199 - spin_lock(&vfsmount_lock); 1200 list_add_tail(&newmnt->mnt_expire, fslist); 1201 - spin_unlock(&vfsmount_lock); 1202 - } 1203 up_write(&namespace_sem); 1204 return 0; 1205
··· 262 /* stick the duplicate mount on the same expiry list 263 * as the original if that was on one */ 264 if (flag & CL_EXPIRE) { 265 if (!list_empty(&old->mnt_expire)) 266 list_add(&mnt->mnt_expire, &old->mnt_expire); 267 } 268 } 269 return mnt; ··· 1127 if (err) 1128 goto out1; 1129 1130 /* if the mount is moved, it should no longer be expire 1131 * automatically */ 1132 list_del_init(&old_nd.path.mnt->mnt_expire); 1133 out1: 1134 mutex_unlock(&nd->path.dentry->d_inode->i_mutex); 1135 out: ··· 1198 if ((err = graft_tree(newmnt, nd))) 1199 goto unlock; 1200 1201 + if (fslist) /* add to the specified expiration list */ 1202 list_add_tail(&newmnt->mnt_expire, fslist); 1203 + 1204 up_write(&namespace_sem); 1205 return 0; 1206