diff options
author | David S. Miller <davem@davemloft.net> | 2018-05-04 15:58:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-04 15:58:56 +0200 |
commit | a7b15ab887e5b8e9803136b5a4a0008d7a3dea86 (patch) | |
tree | ca5342d29badb2a3cce2a353b786c8ab4a993c1e /block/bfq-iosched.c | |
parent | Merge branch 'sh_eth-complain-on-access-to-unimplemented-TSU-registers' (diff) | |
parent | Merge tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
download | linux-a7b15ab887e5b8e9803136b5a4a0008d7a3dea86.tar.xz linux-a7b15ab887e5b8e9803136b5a4a0008d7a3dea86.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes in selftests Makefile.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r-- | block/bfq-iosched.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index f0ecd98509d8..771ae9730ac6 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -4934,8 +4934,16 @@ static void bfq_prepare_request(struct request *rq, struct bio *bio) bool new_queue = false; bool bfqq_already_existing = false, split = false; - if (!rq->elv.icq) + /* + * Even if we don't have an icq attached, we should still clear + * the scheduler pointers, as they might point to previously + * allocated bic/bfqq structs. + */ + if (!rq->elv.icq) { + rq->elv.priv[0] = rq->elv.priv[1] = NULL; return; + } + bic = icq_to_bic(rq->elv.icq); spin_lock_irq(&bfqd->lock); |