diff mbox series

[v7,3/8] btrfs: unexport btrfs_scratch_superblocks

Message ID 20200212071704.17505-4-johannes.thumshirn@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs: remove buffer heads form superblock handling | expand

Commit Message

Johannes Thumshirn Feb. 12, 2020, 7:16 a.m. UTC
btrfs_scratch_superblocks() isn't used anywhere outside volumes.c so
remove it from the header file and mark it as static.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/volumes.c | 6 +++++-
 fs/btrfs/volumes.h | 1 -
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Christoph Hellwig Feb. 12, 2020, 7:27 a.m. UTC | #1
On Wed, Feb 12, 2020 at 04:16:59PM +0900, Johannes Thumshirn wrote:
> btrfs_scratch_superblocks() isn't used anywhere outside volumes.c so
> remove it from the header file and mark it as static.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

It wasn't exported to start with, just global scope while you
mark it static now.
Johannes Thumshirn Feb. 12, 2020, 7:51 a.m. UTC | #2
On 12/02/2020 08:27, Christoph Hellwig wrote:
> On Wed, Feb 12, 2020 at 04:16:59PM +0900, Johannes Thumshirn wrote:
>> btrfs_scratch_superblocks() isn't used anywhere outside volumes.c so
>> remove it from the header file and mark it as static.
>>
>> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> 
> It wasn't exported to start with, just global scope while you
> mark it static now.
> 

I think David can tweak the commit message when applying.
diff mbox series

Patch

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 620794f1ea64..e17d4d7a6eb4 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -32,6 +32,9 @@ 
 #include "block-group.h"
 #include "discard.h"
 
+static void btrfs_scratch_superblocks(struct block_device *bdev,
+				      const char *device_path);
+
 const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = {
 	[BTRFS_RAID_RAID10] = {
 		.sub_stripes	= 2,
@@ -7316,7 +7319,8 @@  int btrfs_get_dev_stats(struct btrfs_fs_info *fs_info,
 	return 0;
 }
 
-void btrfs_scratch_superblocks(struct block_device *bdev, const char *device_path)
+static void btrfs_scratch_superblocks(struct block_device *bdev,
+				      const char *device_path)
 {
 	struct buffer_head *bh;
 	struct btrfs_super_block *disk_super;
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index b7f2edbc6581..a3d86ee6a883 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -473,7 +473,6 @@  int btrfs_run_dev_stats(struct btrfs_trans_handle *trans);
 void btrfs_rm_dev_replace_remove_srcdev(struct btrfs_device *srcdev);
 void btrfs_rm_dev_replace_free_srcdev(struct btrfs_device *srcdev);
 void btrfs_destroy_dev_replace_tgtdev(struct btrfs_device *tgtdev);
-void btrfs_scratch_superblocks(struct block_device *bdev, const char *device_path);
 int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info,
 			   u64 logical, u64 len);
 unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,