Message ID | 9355f3bb85dcdb05a30ad8f7e11bedae2f08afb0.1489593696.git.dsterba@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Mar 15, 2017 at 05:02:42PM +0100, David Sterba wrote: > The name is misleading and the local variable serves no purpose. Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Thanks, -liubo > > Signed-off-by: David Sterba <dsterba@suse.com> > --- > fs/btrfs/reada.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c > index 91df381a60ce..64425c3fe4f5 100644 > --- a/fs/btrfs/reada.c > +++ b/fs/btrfs/reada.c > @@ -318,7 +318,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, > struct btrfs_bio *bbio = NULL; > struct btrfs_device *dev; > struct btrfs_device *prev_dev; > - u32 blocksize; > u64 length; > int real_stripes; > int nzones = 0; > @@ -339,7 +338,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, > if (!re) > return NULL; > > - blocksize = fs_info->nodesize; > re->logical = logical; > re->top = *top; > INIT_LIST_HEAD(&re->extctl); > @@ -349,10 +347,10 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, > /* > * map block > */ > - length = blocksize; > + length = fs_info->nodesize; > ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, > &length, &bbio, 0); > - if (ret || !bbio || length < blocksize) > + if (ret || !bbio || length < fs_info->nodesize) > goto error; > > if (bbio->num_stripes > BTRFS_MAX_MIRRORS) { > -- > 2.12.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 91df381a60ce..64425c3fe4f5 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -318,7 +318,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, struct btrfs_bio *bbio = NULL; struct btrfs_device *dev; struct btrfs_device *prev_dev; - u32 blocksize; u64 length; int real_stripes; int nzones = 0; @@ -339,7 +338,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, if (!re) return NULL; - blocksize = fs_info->nodesize; re->logical = logical; re->top = *top; INIT_LIST_HEAD(&re->extctl); @@ -349,10 +347,10 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, /* * map block */ - length = blocksize; + length = fs_info->nodesize; ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, &length, &bbio, 0); - if (ret || !bbio || length < blocksize) + if (ret || !bbio || length < fs_info->nodesize) goto error; if (bbio->num_stripes > BTRFS_MAX_MIRRORS) {
The name is misleading and the local variable serves no purpose. Signed-off-by: David Sterba <dsterba@suse.com> --- fs/btrfs/reada.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)