diff options
author | David Sterba <dsterba@suse.com> | 2017-03-15 11:39:59 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-04-18 08:07:25 -0400 |
commit | 994a5d2bc758792f1808d7b112990a14182ef847 (patch) | |
tree | 401a35ca0ddce1409bb2b481b9781957703b2f54 /fs | |
parent | 5721b8ad260f6ed15e3c82447981dd7a2f4bdf72 (diff) |
btrfs: remove local blocksize variable in reada_find_extent
The name is misleading and the local variable serves no purpose.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/reada.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 5c1e6bbed132..a17e775a4a89 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c | |||
@@ -320,7 +320,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, | |||
320 | struct btrfs_bio *bbio = NULL; | 320 | struct btrfs_bio *bbio = NULL; |
321 | struct btrfs_device *dev; | 321 | struct btrfs_device *dev; |
322 | struct btrfs_device *prev_dev; | 322 | struct btrfs_device *prev_dev; |
323 | u32 blocksize; | ||
324 | u64 length; | 323 | u64 length; |
325 | int real_stripes; | 324 | int real_stripes; |
326 | int nzones = 0; | 325 | int nzones = 0; |
@@ -341,7 +340,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, | |||
341 | if (!re) | 340 | if (!re) |
342 | return NULL; | 341 | return NULL; |
343 | 342 | ||
344 | blocksize = fs_info->nodesize; | ||
345 | re->logical = logical; | 343 | re->logical = logical; |
346 | re->top = *top; | 344 | re->top = *top; |
347 | INIT_LIST_HEAD(&re->extctl); | 345 | INIT_LIST_HEAD(&re->extctl); |
@@ -351,10 +349,10 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, | |||
351 | /* | 349 | /* |
352 | * map block | 350 | * map block |
353 | */ | 351 | */ |
354 | length = blocksize; | 352 | length = fs_info->nodesize; |
355 | ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, | 353 | ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, |
356 | &length, &bbio, 0); | 354 | &length, &bbio, 0); |
357 | if (ret || !bbio || length < blocksize) | 355 | if (ret || !bbio || length < fs_info->nodesize) |
358 | goto error; | 356 | goto error; |
359 | 357 | ||
360 | if (bbio->num_stripes > BTRFS_MAX_MIRRORS) { | 358 | if (bbio->num_stripes > BTRFS_MAX_MIRRORS) { |