Skip to content

Commit 1da85fd

Browse files
Fabian Fredericktorvalds
authored andcommitted
fs/bfs: use bfs prefix for dump_imap
All bfs related functions use bfs_ prefix. This patch also moves extern declaration to bfs.h and removes prototype from inode.c This fixes checkpatch warning: WARNING: externs should be avoided in .c files Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 19bdd41 commit 1da85fd

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎fs/bfs/bfs.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static inline struct bfs_inode_info *BFS_I(struct inode *inode)
4646

4747
/* inode.c */
4848
extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
49+
extern void bfs_dump_imap(const char *, struct super_block *);
4950

5051
/* file.c */
5152
extern const struct inode_operations bfs_file_inops;

‎fs/bfs/dir.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ const struct file_operations bfs_dir_operations = {
7575
.llseek = generic_file_llseek,
7676
};
7777

78-
extern void dump_imap(const char *, struct super_block *);
79-
8078
static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
8179
bool excl)
8280
{
@@ -110,7 +108,7 @@ static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
110108
BFS_I(inode)->i_eblock = 0;
111109
insert_inode_hash(inode);
112110
mark_inode_dirty(inode);
113-
dump_imap("create", s);
111+
bfs_dump_imap("create", s);
114112

115113
err = bfs_add_entry(dir, dentry->d_name.name, dentry->d_name.len,
116114
inode->i_ino);

‎fs/bfs/inode.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ MODULE_LICENSE("GPL");
3030
#define dprintf(x...)
3131
#endif
3232

33-
void dump_imap(const char *prefix, struct super_block *s);
34-
3533
struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
3634
{
3735
struct bfs_inode *di;
@@ -194,7 +192,7 @@ static void bfs_evict_inode(struct inode *inode)
194192
info->si_freeb += bi->i_eblock + 1 - bi->i_sblock;
195193
info->si_freei++;
196194
clear_bit(ino, info->si_imap);
197-
dump_imap("delete_inode", s);
195+
bfs_dump_imap("delete_inode", s);
198196
}
199197

200198
/*
@@ -297,7 +295,7 @@ static const struct super_operations bfs_sops = {
297295
.statfs = bfs_statfs,
298296
};
299297

300-
void dump_imap(const char *prefix, struct super_block *s)
298+
void bfs_dump_imap(const char *prefix, struct super_block *s)
301299
{
302300
#ifdef DEBUG
303301
int i;
@@ -443,7 +441,7 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
443441
}
444442
brelse(bh);
445443
brelse(sbh);
446-
dump_imap("read_super", s);
444+
bfs_dump_imap("read_super", s);
447445
return 0;
448446

449447
out3:

0 commit comments

Comments
 (0)