Skip to content

Commit 9840bb6

Browse files
jtlaytonbrauner
authored andcommitted
vfs: remove externs from fs.h on functions modified by i_ino widening
Christoph says, in response to one of the patches in the i_ino widening series, which changes the prototype of several functions in fs.h: "Can you please drop all these pointless externs while you're at it?" Remove extern keyword from functions touched by that patch (and a few that happened to be nearby). Also add missing argument names to declarations that lacked them. Suggested-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260307-iino-u64-v2-1-a1a1696e0653@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 998a59d commit 9840bb6

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

include/linux/fs.h

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,27 +2912,27 @@ static inline bool name_contains_dotdot(const char *name)
29122912
#include <linux/err.h>
29132913

29142914
/* needed for stackable file system support */
2915-
extern loff_t default_llseek(struct file *file, loff_t offset, int whence);
2915+
loff_t default_llseek(struct file *file, loff_t offset, int whence);
29162916

2917-
extern loff_t vfs_llseek(struct file *file, loff_t offset, int whence);
2917+
loff_t vfs_llseek(struct file *file, loff_t offset, int whence);
29182918

2919-
extern int inode_init_always_gfp(struct super_block *, struct inode *, gfp_t);
2919+
int inode_init_always_gfp(struct super_block *sb, struct inode *inode, gfp_t gfp);
29202920
static inline int inode_init_always(struct super_block *sb, struct inode *inode)
29212921
{
29222922
return inode_init_always_gfp(sb, inode, GFP_NOFS);
29232923
}
29242924

2925-
extern void inode_init_once(struct inode *);
2926-
extern void address_space_init_once(struct address_space *mapping);
2927-
extern struct inode * igrab(struct inode *);
2928-
extern ino_t iunique(struct super_block *, ino_t);
2929-
extern int inode_needs_sync(struct inode *inode);
2930-
extern int inode_just_drop(struct inode *inode);
2925+
void inode_init_once(struct inode *inode);
2926+
void address_space_init_once(struct address_space *mapping);
2927+
struct inode *igrab(struct inode *inode);
2928+
ino_t iunique(struct super_block *sb, ino_t max_reserved);
2929+
int inode_needs_sync(struct inode *inode);
2930+
int inode_just_drop(struct inode *inode);
29312931
static inline int inode_generic_drop(struct inode *inode)
29322932
{
29332933
return !inode->i_nlink || inode_unhashed(inode);
29342934
}
2935-
extern void d_mark_dontcache(struct inode *inode);
2935+
void d_mark_dontcache(struct inode *inode);
29362936

29372937
struct inode *ilookup5_nowait(struct super_block *sb, u64 hashval,
29382938
int (*test)(struct inode *, void *), void *data,
@@ -2944,31 +2944,31 @@ struct inode *ilookup(struct super_block *sb, u64 ino);
29442944
struct inode *inode_insert5(struct inode *inode, u64 hashval,
29452945
int (*test)(struct inode *, void *),
29462946
int (*set)(struct inode *, void *), void *data);
2947-
struct inode *iget5_locked(struct super_block *, u64,
2947+
struct inode *iget5_locked(struct super_block *sb, u64 hashval,
29482948
int (*test)(struct inode *, void *),
2949-
int (*set)(struct inode *, void *), void *);
2950-
struct inode *iget5_locked_rcu(struct super_block *, u64,
2949+
int (*set)(struct inode *, void *), void *data);
2950+
struct inode *iget5_locked_rcu(struct super_block *sb, u64 hashval,
29512951
int (*test)(struct inode *, void *),
2952-
int (*set)(struct inode *, void *), void *);
2953-
struct inode *iget_locked(struct super_block *, u64);
2954-
struct inode *find_inode_nowait(struct super_block *, u64,
2952+
int (*set)(struct inode *, void *), void *data);
2953+
struct inode *iget_locked(struct super_block *sb, u64 ino);
2954+
struct inode *find_inode_nowait(struct super_block *sb, u64 hashval,
29552955
int (*match)(struct inode *, u64, void *),
29562956
void *data);
2957-
struct inode *find_inode_rcu(struct super_block *, u64,
2958-
int (*)(struct inode *, void *), void *);
2959-
struct inode *find_inode_by_ino_rcu(struct super_block *, u64);
2960-
int insert_inode_locked4(struct inode *, u64,
2961-
int (*test)(struct inode *, void *), void *);
2962-
extern int insert_inode_locked(struct inode *);
2957+
struct inode *find_inode_rcu(struct super_block *sb, u64 hashval,
2958+
int (*test)(struct inode *, void *), void *data);
2959+
struct inode *find_inode_by_ino_rcu(struct super_block *sb, u64 ino);
2960+
int insert_inode_locked4(struct inode *inode, u64 hashval,
2961+
int (*test)(struct inode *, void *), void *data);
2962+
int insert_inode_locked(struct inode *inode);
29632963
#ifdef CONFIG_DEBUG_LOCK_ALLOC
2964-
extern void lockdep_annotate_inode_mutex_key(struct inode *inode);
2964+
void lockdep_annotate_inode_mutex_key(struct inode *inode);
29652965
#else
29662966
static inline void lockdep_annotate_inode_mutex_key(struct inode *inode) { };
29672967
#endif
2968-
extern void unlock_new_inode(struct inode *);
2969-
extern void discard_new_inode(struct inode *);
2970-
extern unsigned int get_next_ino(void);
2971-
extern void evict_inodes(struct super_block *sb);
2968+
void unlock_new_inode(struct inode *inode);
2969+
void discard_new_inode(struct inode *inode);
2970+
unsigned int get_next_ino(void);
2971+
void evict_inodes(struct super_block *sb);
29722972
void dump_mapping(const struct address_space *);
29732973

29742974
/*
@@ -3013,21 +3013,21 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap,
30133013
*/
30143014
#define alloc_inode_sb(_sb, _cache, _gfp) kmem_cache_alloc_lru(_cache, &_sb->s_inode_lru, _gfp)
30153015

3016-
void __insert_inode_hash(struct inode *, u64 hashval);
3016+
void __insert_inode_hash(struct inode *inode, u64 hashval);
30173017
static inline void insert_inode_hash(struct inode *inode)
30183018
{
30193019
__insert_inode_hash(inode, inode->i_ino);
30203020
}
30213021

3022-
extern void __remove_inode_hash(struct inode *);
3022+
void __remove_inode_hash(struct inode *inode);
30233023
static inline void remove_inode_hash(struct inode *inode)
30243024
{
30253025
if (!inode_unhashed(inode) && !hlist_fake(&inode->i_hash))
30263026
__remove_inode_hash(inode);
30273027
}
30283028

3029-
extern void inode_sb_list_add(struct inode *inode);
3030-
extern void inode_lru_list_add(struct inode *inode);
3029+
void inode_sb_list_add(struct inode *inode);
3030+
void inode_lru_list_add(struct inode *inode);
30313031

30323032
int generic_file_mmap(struct file *, struct vm_area_struct *);
30333033
int generic_file_mmap_prepare(struct vm_area_desc *desc);

0 commit comments

Comments
 (0)