Skip to content

Commit 3373a34

Browse files
zhengbin13axboe
authored andcommitted
block: make function 'kill_bdev' static
kill_bdev does not have any external user, so make it static. Signed-off-by: Zheng Bin <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent f4bd34b commit 3373a34

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

fs/block_dev.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void bdev_write_inode(struct block_device *bdev)
7575
}
7676

7777
/* Kill _all_ buffers and pagecache , dirty or not.. */
78-
void kill_bdev(struct block_device *bdev)
78+
static void kill_bdev(struct block_device *bdev)
7979
{
8080
struct address_space *mapping = bdev->bd_inode->i_mapping;
8181

@@ -84,8 +84,7 @@ void kill_bdev(struct block_device *bdev)
8484

8585
invalidate_bh_lrus();
8686
truncate_inode_pages(mapping, 0);
87-
}
88-
EXPORT_SYMBOL(kill_bdev);
87+
}
8988

9089
/* Invalidate clean unused buffers and pagecache. */
9190
void invalidate_bdev(struct block_device *bdev)

include/linux/fs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,6 @@ extern void bdput(struct block_device *);
25922592
extern void invalidate_bdev(struct block_device *);
25932593
extern void iterate_bdevs(void (*)(struct block_device *, void *), void *);
25942594
extern int sync_blockdev(struct block_device *bdev);
2595-
extern void kill_bdev(struct block_device *);
25962595
extern struct super_block *freeze_bdev(struct block_device *);
25972596
extern void emergency_thaw_all(void);
25982597
extern void emergency_thaw_bdev(struct super_block *sb);
@@ -2608,7 +2607,6 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
26082607
#else
26092608
static inline void bd_forget(struct inode *inode) {}
26102609
static inline int sync_blockdev(struct block_device *bdev) { return 0; }
2611-
static inline void kill_bdev(struct block_device *bdev) {}
26122610
static inline void invalidate_bdev(struct block_device *bdev) {}
26132611

26142612
static inline struct super_block *freeze_bdev(struct block_device *sb)

0 commit comments

Comments
 (0)