From 5573c20fad115e0b4c361b3805736f8a8d58dff1 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 24 Jun 2020 18:03:15 +0200 Subject: fs: btrfs: Cleanup the old implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cleans up the now unneeded code from the old btrfs implementation. Signed-off-by: Qu Wenruo Reviewed-by: Marek BehĂșn --- fs/btrfs/disk-io.c | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'fs/btrfs/disk-io.c') diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4da1b80038..01e7cee520 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -310,36 +310,6 @@ int btrfs_read_dev_super(struct blk_desc *desc, struct disk_partition *part, return 0; } -int btrfs_read_superblock(void) -{ - ALLOC_CACHE_ALIGN_BUFFER(char, raw_sb, BTRFS_SUPER_INFO_SIZE); - struct btrfs_super_block *sb = (struct btrfs_super_block *) raw_sb; - int ret; - - - btrfs_info.sb.generation = 0; - - ret = btrfs_read_dev_super(btrfs_blk_desc, btrfs_part_info, sb); - if (ret < 0) { - pr_debug("%s: No valid BTRFS superblock found!\n", __func__); - return ret; - } - btrfs_super_block_to_cpu(sb); - memcpy(&btrfs_info.sb, sb, sizeof(*sb)); - - if (btrfs_info.sb.num_devices != 1) { - printf("%s: Unsupported number of devices (%lli). This driver " - "only supports filesystem on one device.\n", __func__, - btrfs_info.sb.num_devices); - return -1; - } - - pr_debug("Chosen superblock with generation = %llu\n", - btrfs_info.sb.generation); - - return 0; -} - static int __csum_tree_block_size(struct extent_buffer *buf, u16 csum_size, int verify, int silent, u16 csum_type) { -- cgit v1.2.3