Skip to contentSkip to conversation

lock_mount(): Remove unused function

PATCH In review Andy Shevchenko 2 participants 4 messages Sep 15, 2025 – Sep 16, 2025 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lock_mount(): Remove unused function

clang is not happy about unused function:

/fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
2856 | static inline void lock_mount(const struct path *path,

      |                    ^~~~~~~~~~

1 error generated.

Fix the compilation breakage (make W=1 build) by removing unused function.

Fixes d14b32629541 ("change calling conventions for lock_mount() et.al.")
---
 fs/namespace.c | 6 ------
 1 file changed, 6 deletions(-)
fs/namespace.c +0 -6
index 14924dd3a21b..ebd61d903a59 100644
@@ -2853,12 +2853,6 @@ static void do_lock_mount(const struct path *path,
 	} while (err == -EAGAIN);
 }
 
-static inline void lock_mount(const struct path *path,
-			      struct pinned_mountpoint *m)
-{
-	do_lock_mount(path, m, false);
-}
-
 static void __unlock_mount(struct pinned_mountpoint *m)
 {
 	inode_unlock(m->mp->m_dentry->d_inode);
Signature · 1 line
2.50.1
maintainer
#1 lore raw
Quoted 11 lines · Andy Shevchenko

clang is not happy about unused function:

/fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
2856 | static inline void lock_mount(const struct path *path,

      |                    ^~~~~~~~~~

1 error generated.

Fix the compilation breakage (make W=1 build) by removing unused function.

Fixes d14b32629541 ("change calling conventions for lock_mount() et.al.")

Folded into commit in question to avoid bisect hazard

#2 lore raw
Quoted 8 lines · Al Viro
Quoted 7 lines · Andy Shevchenko

clang is not happy about unused function:

/fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
2856 | static inline void lock_mount(const struct path *path,

      |                    ^~~~~~~~~~

1 error generated.

Quoted 6 lines
Quoted 4 lines

Fix the compilation breakage (make W=1 build) by removing unused function.

Fixes d14b32629541 ("change calling conventions for lock_mount() et.al.")

Folded into commit in question to avoid bisect hazard

Thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Al Viro
Quoted 7 lines · Andy Shevchenko

clang is not happy about unused function:

/fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
2856 | static inline void lock_mount(const struct path *path,

      |                    ^~~~~~~~~~

1 error generated.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Fix the compilation breakage (make W=1 build) by removing unused function.

Fixes d14b32629541 ("change calling conventions for lock_mount() et.al.")

Folded into commit in question to avoid bisect hazard

Thank you!

It seems similar treatment needs for node_to_mnt_ns() as it's now unused after the commit 96ff702edaec ("mnt: support ns lookup") if I'm not mistaken.

Should I send a patch?

Signature · 2 lines
With Best Regards,
Andy Shevchenko