From: Christian Brauner Date: Thu, 19 Dec 2024 13:59:14 +0000 (+0100) Subject: fs: remove useless lockdep assertion X-Git-Tag: io_uring-6.14-20240131~35^2~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=22eb23b8a7b2536a475ac87244ee4ab50764eccd;p=linux-block.git fs: remove useless lockdep assertion mnt_ns_release() can run asynchronously via call_rcu() so hitting that lockdep assertion means someone else already grabbed the mnt_ns_tree_lock and causes a false positive. That assertion has likely always been wrong. call_rcu() just makes it more likely to hit. Link: https://lore.kernel.org/r/Z2PlT5rcRTIhCpft@ly-workstation Link: https://lore.kernel.org/r/20241219-darben-quietschen-b6e1d80327bb@brauner Reported-by: Lai, Yi Signed-off-by: Christian Brauner --- diff --git a/fs/namespace.c b/fs/namespace.c index e607762fd9c7..371c860f49de 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -160,8 +160,6 @@ static void mnt_ns_tree_add(struct mnt_namespace *ns) static void mnt_ns_release(struct mnt_namespace *ns) { - lockdep_assert_not_held(&mnt_ns_tree_lock.lock); - /* keep alive for {list,stat}mount() */ if (refcount_dec_and_test(&ns->passive)) { put_user_ns(ns->user_ns);