fs/9p: remove unnecessary extern keywords from header files
PATCH 1/1 fs/9p: remove unnecessary extern keywords from header files
Remove explicit extern keywords from function prototypes in 9p header files.
--- fs/9p/cache.h | 6 +++--- fs/9p/v9fs.h | 32 ++++++++++++++++---------------- fs/9p/v9fs_vfs.h | 18 +++++++++--------- fs/9p/xattr.h | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-)
fs/9p/cache.h +3 -3
@@ -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 */
fs/9p/v9fs.h +16 -16
@@ -166,32 +166,32 @@ static inline struct fscache_volume *v9fs_session_cache(struct v9fs_session_info#endif } -extern const struct fs_parameter_spec v9fs_param_spec[]; +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, +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); -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, +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, +const struct inode_operations v9fs_dir_inode_operations_dotl; +const struct inode_operations v9fs_file_inode_operations_dotl; +const struct inode_operations v9fs_symlink_inode_operations_dotl; +const struct netfs_request_ops v9fs_req_ops; +struct inode *v9fs_inode_from_fid_dotl (struct v9fs_session_info *v9ses,struct p9_fid *fid,struct super_block *sb,int new);
fs/9p/v9fs_vfs.h +9 -9
@@ -28,15 +28,15 @@/* flags for v9fs_stat2inode() & v9fs_stat2inode_dotl() */ #define V9FS_STAT2INODE_KEEP_ISIZE 1 -extern struct file_system_type v9fs_fs_type; -extern const struct address_space_operations v9fs_addr_operations; -extern const struct file_operations v9fs_file_operations; -extern const struct file_operations v9fs_file_operations_dotl; -extern const struct file_operations v9fs_dir_operations; -extern const struct file_operations v9fs_dir_operations_dotl; -extern const struct dentry_operations v9fs_dentry_operations; -extern const struct dentry_operations v9fs_cached_dentry_operations; -extern struct kmem_cache *v9fs_inode_cache; +struct file_system_type v9fs_fs_type; +const struct address_space_operations v9fs_addr_operations; +const struct file_operations v9fs_file_operations; +const struct file_operations v9fs_file_operations_dotl; +const struct file_operations v9fs_dir_operations; +const struct file_operations v9fs_dir_operations_dotl; +const struct dentry_operations v9fs_dentry_operations; +const struct dentry_operations v9fs_cached_dentry_operations; +struct kmem_cache *v9fs_inode_cache;struct inode *v9fs_alloc_inode (struct super_block *sb);void v9fs_free_inode (struct inode *inode);
fs/9p/xattr.h +1 -1
@@ -10,7 +10,7 @@#include <net/9p/9p.h> #include <net/9p/client.h> -extern const struct xattr_handler *const v9fs_xattr_handlers[]; +const struct xattr_handler *const v9fs_xattr_handlers[];ssize_t v9fs_fid_xattr_get (struct p9_fid *fid,const char *name,void *buffer,size_t buffer_size);
Signature · 1 line
2.50.1 (Apple Git-155)
Dominique Martinet
maintainerBaran Arda wrote on Fri, Apr 10, 2026 at 11:26:51PM +0300:
Quoted 4 lines
Remove explicit extern keywords from function prototypes in 9p header files.
Signed-off-by Baran Arda <[email protected]>
Sure, why not, will send in next batch to Linus
Signature · 1 line
Dominique
Dominique Martinet
maintainerDominique Martinet wrote on Thu, Apr 16, 2026 at 10:55:09AM +0900:
Quoted 1 line
Sure, why not, will send in next batch to Linus
Actually scratch that, many of these are not function definitions but external variables, the extern
This also conflicts (trivially) with the negative dentry cache patch so it's not worth the effort, I'm dropping it for now
Signature · 1 line
Dominique Martinet | Asmadeus
PATCH v2 1/1 fs/9p: remove unnecessary extern keywords from function prototypes
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.
---
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(-)
fs/9p/cache.h +3 -3
@@ -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 */
fs/9p/v9fs.h +12 -12
@@ -168,30 +168,30 @@ static inline struct fscache_volume *v9fs_session_cache(struct v9fs_session_infoextern 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);