block: kyber: fix domain token leak during requeue
authorMing Lei <ming.lei@redhat.com>
Fri, 23 Feb 2018 15:36:57 +0000 (23:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 06:41:05 +0000 (22:41 -0800)
commit7f43f610c4bb8e4da69923d0ce0c60a82073bf2c
tree48a0e743f559842b3f25e0b0ead2002d638c4eea
parent17644a0bbb190b6286106e98392f3d60ee020a23
block: kyber: fix domain token leak during requeue

commit ba989a01469d027861e55c8f1121edadef757797 upstream.

When requeuing request, the domain token should have been freed
before re-inserting the request to io scheduler. Otherwise, the
assigned domain token will be leaked, and IO hang can be caused.

Cc: Paolo Valente <paolo.valente@linaro.org>
Cc: Omar Sandoval <osandov@fb.com>
Cc: stable@vger.kernel.org
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/kyber-iosched.c