nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed
authorYu Kuai <yukuai3@huawei.com>
Sat, 21 May 2022 07:37:46 +0000 (15:37 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 28 May 2022 02:39:33 +0000 (20:39 -0600)
commit2895f1831e911ca87d4efdf43e35eb72a0c7e66e
tree57f84e53d2d602368e19263d50806375e79098f2
parentc55b2b983b0fa012942c3eb16384b2b722caa810
nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed

Otherwise io will hung because request will only be completed if the
cmd has the flag 'NBD_CMD_INFLIGHT'.

Fixes: 07175cb1baf4 ("nbd: make sure request completion won't concurrent")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20220521073749.3146892-4-yukuai3@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c