summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-01-13 15:28:32 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-01-30 12:34:37 +0100
commitcec0707e40ae25794b5a2de7b7f03c51961f80d9 (patch)
tree85975a5b68ebf20bdb54b01846484fbc4b2c6455
parentblock: Fix documentation for blkdev_issue_flush() (diff)
downloadlinux-cec0707e40ae25794b5a2de7b7f03c51961f80d9.tar.xz
linux-cec0707e40ae25794b5a2de7b7f03c51961f80d9.zip
block: silently error an unsupported barrier bio
This fixes a "regression" from 2.6.28, where the barrier probes that file systems may do would trigger additional end request warnings in dmesg. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--block/blk-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 9e2e86fb78b8..ae75c047f45d 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1451,6 +1451,11 @@ static inline void __generic_make_request(struct bio *bio)
err = -EOPNOTSUPP;
goto end_io;
}
+ if (bio_barrier(bio) && bio_has_data(bio) &&
+ (q->next_ordered == QUEUE_ORDERED_NONE)) {
+ err = -EOPNOTSUPP;
+ goto end_io;
+ }
ret = q->make_request_fn(q, bio);
} while (ret);