[PATCH v2] fs/9p: remove unnecessary extern keywords from function prototypes

From: Baran Arda

Date: Thu Apr 16 2026 - 05:05:20 EST


Hello Dominique,

Thank you for your feedback. In this second version, I have removed the 'extern' keywords only from function prototypes.

I understand this is a minor cleanup, but it is my first contribution to the Linux kernel and I am excited to learn the process. I appreciate your time and effort in reviewing this.

Best regards,
Baran Arda

fs/9p: remove unnecessary extern keywords from function prototypes

Remove explicit extern keywords from function prototypes in 9p
header files. This cleans up the code in accordance with the
kernel coding style.

Signed-off-by: Baran Arda <baran9arda@xxxxxxxxx>
---
v2:
- Restored 'extern' keywords for variables as requested by maintainers.
- Only modified function prototypes in this version.

fs/9p/cache.h | 6 +++---
fs/9p/v9fs.h | 24 ++++++++++++------------
2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/fs/9p/cache.h b/fs/9p/cache.h
index ee1b6b06a2fd..25f0dd58122e 100644
--- a/fs/9p/cache.h
+++ b/fs/9p/cache.h
@@ -11,10 +11,10 @@
#ifdef CONFIG_9P_FSCACHE
#include <linux/fscache.h>

-extern int v9fs_cache_session_get_cookie(struct v9fs_session_info *v9ses,
- const char *dev_name);
+int v9fs_cache_session_get_cookie(struct v9fs_session_info *v9ses,
+ const char *dev_name);

-extern void v9fs_cache_inode_get_cookie(struct inode *inode);
+void v9fs_cache_inode_get_cookie(struct inode *inode);

#else /* CONFIG_9P_FSCACHE */

diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h
index 6a12445d3858..2d37505704a9 100644
--- a/fs/9p/v9fs.h
+++ b/fs/9p/v9fs.h
@@ -168,30 +168,30 @@ static inline struct fscache_volume *v9fs_session_cache(struct v9fs_session_info

extern const struct fs_parameter_spec v9fs_param_spec[];

-extern int v9fs_parse_param(struct fs_context *fc, struct fs_parameter *param);
-extern int v9fs_show_options(struct seq_file *m, struct dentry *root);
+int v9fs_parse_param(struct fs_context *fc, struct fs_parameter *param);
+int v9fs_show_options(struct seq_file *m, struct dentry *root);

struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
struct fs_context *fc);
-extern void v9fs_session_close(struct v9fs_session_info *v9ses);
-extern void v9fs_session_cancel(struct v9fs_session_info *v9ses);
-extern void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses);
-extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
- unsigned int flags);
-extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
-extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
-extern int v9fs_vfs_rename(struct mnt_idmap *idmap,
+void v9fs_session_close(struct v9fs_session_info *v9ses);
+void v9fs_session_cancel(struct v9fs_session_info *v9ses);
+void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses);
+struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
+ unsigned int flags);
+int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
+int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
+int v9fs_vfs_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags);
-extern struct inode *v9fs_inode_from_fid(struct v9fs_session_info *v9ses,
+struct inode *v9fs_inode_from_fid(struct v9fs_session_info *v9ses,
struct p9_fid *fid,
struct super_block *sb, int new);
extern const struct inode_operations v9fs_dir_inode_operations_dotl;
extern const struct inode_operations v9fs_file_inode_operations_dotl;
extern const struct inode_operations v9fs_symlink_inode_operations_dotl;
extern const struct netfs_request_ops v9fs_req_ops;
-extern struct inode *v9fs_inode_from_fid_dotl(struct v9fs_session_info *v9ses,
+struct inode *v9fs_inode_from_fid_dotl(struct v9fs_session_info *v9ses,
struct p9_fid *fid,
struct super_block *sb, int new);