From 5b1e5e690da7a9ffce5945dc5fa90f94aae876f6 Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Thu, 8 Oct 2020 11:52:29 +0800 Subject: [PATCH 2109/2944] blk-throttle: Re-use the throtl_set_slice_end() fix #30641350 commit 1da30f952a81718a9c3b651121a274b093f44932 upstream Re-use throtl_set_slice_end() to remove duplicate code. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe Reviewed-by: Joseph Qi --- block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index aa78795..9c1222c 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -855,7 +855,7 @@ static inline void throtl_set_slice_end(struct throtl_grp *tg, bool rw, static inline void throtl_extend_slice(struct throtl_grp *tg, bool rw, unsigned long jiffy_end) { - tg->slice_end[rw] = roundup(jiffy_end, tg->td->throtl_slice); + throtl_set_slice_end(tg, rw, jiffy_end); throtl_log(&tg->service_queue, "[%c] extend slice start=%lu end=%lu jiffies=%lu", rw == READ ? 'R' : 'W', tg->slice_start[rw], -- 1.8.3.1