[24/32] btrfs-progs: Refactor sectorsize users in free-space-tree.c
diff mbox

Message ID 20170518033857.15002-25-quwenruo@cn.fujitsu.com
State New
Headers show

Commit Message

Qu Wenruo May 18, 2017, 3:38 a.m. UTC
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 free-space-tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/free-space-tree.c b/free-space-tree.c
index f3a51263..69a4eca8 100644
--- a/free-space-tree.c
+++ b/free-space-tree.c
@@ -205,7 +205,7 @@  static int load_free_space_bitmaps(struct btrfs_fs_info *fs_info,
 		offset = key.objectid;
 		while (offset < key.objectid + key.offset) {
 			bit = free_space_test_bit(block_group, path, offset,
-						  root->sectorsize);
+						  fs_info->sectorsize);
 			if (prev_bit == 0 && bit == 1) {
 				extent_start = offset;
 			} else if (prev_bit == 1 && bit == 0) {
@@ -213,7 +213,7 @@  static int load_free_space_bitmaps(struct btrfs_fs_info *fs_info,
 				extent_count++;
 			}
 			prev_bit = bit;
-			offset += root->sectorsize;
+			offset += fs_info->sectorsize;
 		}
 	}