]> git.baikalelectronics.ru Git - kernel.git/commit
dm: fix false warning in free_rq_clone() for unmapped requests
authorMike Snitzer <snitzer@redhat.com>
Thu, 28 May 2015 19:12:52 +0000 (15:12 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 29 May 2015 15:07:36 +0000 (11:07 -0400)
commitc9a06466438fd8042d330c69009c2a40405af2df
tree5c0230f71e12c9349e9c755f722bf837456b0802
parentf5af092a8579745c0b1e4965ab7d80aa787c7fce
dm: fix false warning in free_rq_clone() for unmapped requests

When stacking request-based dm device on non blk-mq device and
device-mapper target could not map the request (error target is used,
multipath target with all paths down, etc), the WARN_ON_ONCE() in
free_rq_clone() will trigger when it shouldn't.

The warning was added by commit 8b35f9a ("dm: fix free_rq_clone() NULL
pointer when requeueing unmapped request").  But free_rq_clone() with
clone->q == NULL is valid usage for the case where
dm_kill_unmapped_request() initiates request cleanup.

Fix this false warning by just removing the WARN_ON -- it only generated
false positives and was never useful in catching the intended case
(completing clone request not being mapped e.g. clone->q being NULL).

Fixes: 8b35f9a ("dm: fix free_rq_clone() NULL pointer when requeueing unmapped request")
Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reported-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c