[SRU][J][PATCH v4 08/11] kernfs: remove redundant kernfs_rwsem declaration.

Ghadi Elie Rahme ghadi.rahme at canonical.com
Mon Sep 22 14:34:07 UTC 2025


From: Imran Khan <imran.f.khan at oracle.com>

BugLink: https://bugs.launchpad.net/bugs/2125142

Since 'commit 393c3714081a ("kernfs: switch global kernfs_rwsem lock to
per-fs lock")' per-fs kernfs_rwsem has replaced global kernfs_rwsem.
Remove redundant declaration of global kernfs_rwsem.

Fixes: 393c3714081a ("kernfs: switch global kernfs_rwsem lock to per-fs lock")
Signed-off-by: Imran Khan <imran.f.khan at oracle.com>
Link: https://lore.kernel.org/r/20220218010205.717582-1-imran.f.khan@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
(cherry picked from commit f3a690227f07390b0cfccb96ebbd87bf4ab0a5b2)
Signed-off-by: Ghadi Elie Rahme <ghadi.rahme at canonical.com>
---
 fs/kernfs/kernfs-internal.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index 1b9f2b21d21f..79bad02213c4 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -142,7 +142,6 @@ int __kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr);
 /*
  * dir.c
  */
-extern struct rw_semaphore kernfs_rwsem;
 extern const struct dentry_operations kernfs_dops;
 extern const struct file_operations kernfs_dir_fops;
 extern const struct inode_operations kernfs_dir_iops;
-- 
2.34.1




More information about the kernel-team mailing list