diff options
author | Jeff Moyer <jmoyer@redhat.com> | 2011-10-17 12:57:22 +0200 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-01-08 10:36:41 +0100 |
commit | 49cd475060acc747d3244dce25256054685d1fcf (patch) | |
tree | 7e609e98028dc59860523c4b4009e513b0642258 /block/blk-flush.c | |
parent | 8dfecbadc185852c6e9f77791d8f743c12d9cb53 (diff) | |
download | kernel_samsung_tuna-49cd475060acc747d3244dce25256054685d1fcf.zip kernel_samsung_tuna-49cd475060acc747d3244dce25256054685d1fcf.tar.gz kernel_samsung_tuna-49cd475060acc747d3244dce25256054685d1fcf.tar.bz2 |
blk-flush: fix invalid BUG_ON in blk_insert_flush
A user reported a regression due to commit
4853abaae7e4a2af938115ce9071ef8684fb7af4 (block: fix flush
machinery for stacking drivers with differring flush flags).
Part of the problem is that blk_insert_flush required a
single bio be attached to the request. In reality, having
no attached bio is also a valid case, as can be observed with
an empty flush.
[1] http://www.redhat.com/archives/dm-devel/2011-September/msg00154.html
Reported-by: Christophe Saout <christophe@saout.de>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com
Acked-by: Tejun Heo <tj@kernel.org>
Stable note: 3.1
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r-- | block/blk-flush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c index af7b444..fbdd073 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -319,7 +319,7 @@ void blk_insert_flush(struct request *rq) return; } - BUG_ON(!rq->bio || rq->bio != rq->biotail); + BUG_ON(rq->bio != rq->biotail); /*assumes zero or single bio rq */ /* * If there's data but flush is not necessary, the request can be |