Commit 994a5d2b authored by David Sterba's avatar David Sterba

btrfs: remove local blocksize variable in reada_find_extent

The name is misleading and the local variable serves no purpose.
Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 5721b8ad
...@@ -320,7 +320,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, ...@@ -320,7 +320,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
struct btrfs_bio *bbio = NULL; struct btrfs_bio *bbio = NULL;
struct btrfs_device *dev; struct btrfs_device *dev;
struct btrfs_device *prev_dev; struct btrfs_device *prev_dev;
u32 blocksize;
u64 length; u64 length;
int real_stripes; int real_stripes;
int nzones = 0; int nzones = 0;
...@@ -341,7 +340,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, ...@@ -341,7 +340,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
if (!re) if (!re)
return NULL; return NULL;
blocksize = fs_info->nodesize;
re->logical = logical; re->logical = logical;
re->top = *top; re->top = *top;
INIT_LIST_HEAD(&re->extctl); INIT_LIST_HEAD(&re->extctl);
...@@ -351,10 +349,10 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, ...@@ -351,10 +349,10 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
/* /*
* map block * map block
*/ */
length = blocksize; length = fs_info->nodesize;
ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical,
&length, &bbio, 0); &length, &bbio, 0);
if (ret || !bbio || length < blocksize) if (ret || !bbio || length < fs_info->nodesize)
goto error; goto error;
if (bbio->num_stripes > BTRFS_MAX_MIRRORS) { if (bbio->num_stripes > BTRFS_MAX_MIRRORS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment