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.

mnt: Remove dead code which might prevent from building

Clang, in particular, is not happy about dead code:

fs/namespace.c:135:37: error: unused function 'node_to_mnt_ns' [-Werror,-Wunused-function]
135 | static inline struct mnt_namespace *node_to_mnt_ns(const struct rb_node *node)
| ^~~~~~~~~~~~~~
1 error generated.

Remove a leftover from the previous cleanup.

Fixes: 7d7d16498958 ("mnt: support ns lookup")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251024132336.1666382-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Andy Shevchenko and committed by
Christian Brauner
9db8d467 34ab4c75

-10
-10
fs/namespace.c
··· 132 132 */ 133 133 __cacheline_aligned_in_smp DEFINE_SEQLOCK(mount_lock); 134 134 135 - static inline struct mnt_namespace *node_to_mnt_ns(const struct rb_node *node) 136 - { 137 - struct ns_common *ns; 138 - 139 - if (!node) 140 - return NULL; 141 - ns = rb_entry(node, struct ns_common, ns_tree_node); 142 - return container_of(ns, struct mnt_namespace, ns); 143 - } 144 - 145 135 static void mnt_ns_release(struct mnt_namespace *ns) 146 136 { 147 137 /* keep alive for {list,stat}mount() */