diff options
author | Yu Kuai <yukuai3@huawei.com> | 2023-05-27 09:06:42 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-26 09:53:36 -0600 |
commit | 06257fda83ebfd1c33fb992e41dba7be4e1184d4 (patch) | |
tree | ed347de59d7caaee9d84c9c5ebd75a7011e057fb /block/blk-map.c | |
parent | 71b8642e79f277459555629f2bea1a8d1fed307e (diff) | |
download | linux-06257fda83ebfd1c33fb992e41dba7be4e1184d4.tar.gz linux-06257fda83ebfd1c33fb992e41dba7be4e1184d4.tar.bz2 linux-06257fda83ebfd1c33fb992e41dba7be4e1184d4.zip |
blk-wbt: cleanup rwb_enabled() and wbt_disabled()
'wb_normal' will set to 0 if 'min_lat_nsec' is 0, and 'min_lat_nsec' can
only be set to 0 through sysfs configuration where 'WBT_STATE_OFF_MANUAL'
is set together, in the meantime, they can only be cleared together
through sysfs afterwards. Hence 'wb_normal != 0' is the same as
'rwb->enable_state != WBT_STATE_OFF_MANUAL'.
The code is redundan, hence replace the checking of 'wb_normal' to
'enable_state' in rwb_enabled() and reuse rwb_enabled() for
wbt_disabled().
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230527010644.647900-4-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-map.c')
0 files changed, 0 insertions, 0 deletions