aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-02-17 14:06:45 -0700
committerJens Axboe <axboe@fb.com>2017-02-17 14:06:45 -0700
commit6010720da8aab51f33beee63b73cf88016e9b250 (patch)
treea4c5a7f645998e86a1f49cb05f8e0c4e51448294 /block/blk-throttle.c
parentMerge tag 'powerpc-4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux (diff)
parentnvme: Check for Security send/recv support before issuing commands. (diff)
downloadwireguard-linux-6010720da8aab51f33beee63b73cf88016e9b250.tar.xz
wireguard-linux-6010720da8aab51f33beee63b73cf88016e9b250.zip
Merge branch 'for-4.11/block' into for-4.11/linus-merge
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index a6bb4fe326c3..82fd0cc394eb 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -866,10 +866,12 @@ static void tg_update_disptime(struct throtl_grp *tg)
unsigned long read_wait = -1, write_wait = -1, min_wait = -1, disptime;
struct bio *bio;
- if ((bio = throtl_peek_queued(&sq->queued[READ])))
+ bio = throtl_peek_queued(&sq->queued[READ]);
+ if (bio)
tg_may_dispatch(tg, bio, &read_wait);
- if ((bio = throtl_peek_queued(&sq->queued[WRITE])))
+ bio = throtl_peek_queued(&sq->queued[WRITE]);
+ if (bio)
tg_may_dispatch(tg, bio, &write_wait);
min_wait = min(read_wait, write_wait);