[PATCH] blk: wbt: remove unused parameter from wbt_should_throttle

2021-01-25 Thread chenlei0x
From: Lei Chen The first parameter rwb is not used for this function. So just remove it. Signed-off-by: Lei Chen --- block/blk-wbt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 0321ca8..42aed01 100644 --- a/block/blk-wbt.c +++

[PATCH] xfs: clean code for setting bma length in xfs_bmapi_write

2020-12-12 Thread chenlei0x
From: Lei Chen xfs_bmapi_write may need alloc blocks when it encounters a hole or delay extent. When setting bma.length, it does not need comparing MAXEXTLEN and the length that the caller wants, because xfs_bmapi_allocate will handle every thing properly for bma.length. Signed-off-by: Lei Chen

[PATCH] fs: ext4: remove unnecessary wbc parameter from ext4_bio_write_page

2020-12-10 Thread chenlei0x
From: Lei Chen ext4_bio_write_page does not need wbc parameter, since its parameter io contains the io_wbc field. The io::io_wbc is initialized by ext4_io_submit_init which is called in ext4_writepages and ext4_writepage functions prior to ext4_bio_write_page. Therefor, when ext4_bio_write_page i

[PATCH] driver: pinctrl: fix unused variable warning

2020-12-10 Thread chenlei0x
From: Lei Chen In pinctrl_pins_show, range, gpio_num and chip variables are not used if CONFIG_GPIOLIB is not defined. Use this macro to wrap them. Signed-off-by: Lei Chen --- drivers/pinctrl/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/

[PATCH] fs: iomap: Replace bio_add_page with __bio_add_page in iomap_add_to_ioend

2020-11-29 Thread chenlei0x
From: Lei Chen iomap_add_to_ioend append page on wpc->ioend->io_bio. If io_bio is full, iomap_chain_bio will allocate a new bio. So when bio_add_page is called, pages is guaranteed to be appended into wpc->ioend->io_bio. So we do not need to check if page can be merged. Thus it's a faster way to

[PATCH] block: wbt: Remove unnecessary invoking of wbt_update_limits in wbt_init

2020-11-29 Thread chenlei0x
From: Lei Chen It's unnecessary to call wbt_update_limits explicitly within wbt_init, because it will be called in the following function wbt_queue_depth_changed. Signed-off-by: Lei Chen --- block/blk-wbt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c in

[PATCH] Remove unnecessary invoking of wbt_update_limits in wbt_init

2020-11-13 Thread chenlei0x
From: Lei Chen It's unnecessary to call wbt_update_limits explicitly within wbt_init, because it will be called in the following function wbt_queue_depth_changed. Signed-off-by: Lei Chen --- block/blk-wbt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c in