Skip to content

Commit 7367271

Browse files
morbidrsakdave
authored andcommitted
btrfs: zoned: drop redundant check for REQ_OP_ZONE_APPEND and btrfs_is_zoned
REQ_OP_ZONE_APPEND can only work on zoned devices, so it is redundant to check if the filesystem is zoned when REQ_OP_ZONE_APPEND is set as the bio's bio_op. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 554aed7 commit 7367271

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/btrfs/extent_io.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3283,8 +3283,7 @@ static int calc_bio_boundaries(struct btrfs_bio_ctrl *bio_ctrl,
32833283
else
32843284
bio_ctrl->len_to_stripe_boundary = (u32)geom.len;
32853285

3286-
if (!btrfs_is_zoned(fs_info) ||
3287-
bio_op(bio_ctrl->bio) != REQ_OP_ZONE_APPEND) {
3286+
if (bio_op(bio_ctrl->bio) != REQ_OP_ZONE_APPEND) {
32883287
bio_ctrl->len_to_oe_boundary = U32_MAX;
32893288
return 0;
32903289
}
@@ -3339,7 +3338,7 @@ static int alloc_new_bio(struct btrfs_inode *inode,
33393338
bio_set_dev(bio, bdev);
33403339
wbc_init_bio(wbc, bio);
33413340
}
3342-
if (btrfs_is_zoned(fs_info) && bio_op(bio) == REQ_OP_ZONE_APPEND) {
3341+
if (bio_op(bio) == REQ_OP_ZONE_APPEND) {
33433342
struct btrfs_device *device;
33443343

33453344
device = btrfs_zoned_get_device(fs_info, disk_bytenr,

0 commit comments

Comments
 (0)