Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

open_detached_copy(): don't bother with mount_lock_hash()

we are holding namespace_sem and a reference to root of tree;
iterating through that tree does not need mount_lock. Neither
does the insertion into the rbtree of new namespace or incrementing
the mount count of that namespace.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 71cf10ce 1a22542b

-2
-2
fs/namespace.c
··· 3080 3080 return ERR_CAST(mnt); 3081 3081 } 3082 3082 3083 - lock_mount_hash(); 3084 3083 for (p = mnt; p; p = next_mnt(p, mnt)) { 3085 3084 mnt_add_to_ns(ns, p); 3086 3085 ns->nr_mounts++; 3087 3086 } 3088 3087 ns->root = mnt; 3089 3088 mntget(&mnt->mnt); 3090 - unlock_mount_hash(); 3091 3089 namespace_unlock(); 3092 3090 3093 3091 mntput(path->mnt);