summaryrefslogtreecommitdiff
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-03 12:43:36 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-03 12:43:36 -0700
commitb4f555081fdd27d13e6ff39d455d5aefae9d2c0c (patch)
tree917acaae9556ad2c372d001bf786cfbcf8102684 /block/ll_rw_blk.c
parent160acc2e899f26356bde92bc257253b7ca78f0c3 (diff)
parent51fd77bd9f512ab6cc9df0733ba1caaab89eb957 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: [BLOCK] Don't allow empty barriers to be passed down to queues that don't grok them dm: bounce_pfn limit added Deadline iosched: Fix batching fairness Deadline iosched: Reset batch for ordered requests Deadline iosched: Factor out finding latter reques
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 54fd38589674..75c98d58f4dd 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -3221,6 +3221,7 @@ static inline void __generic_make_request(struct bio *bio)
sector_t old_sector;
int ret, nr_sectors = bio_sectors(bio);
dev_t old_dev;
+ int err = -EIO;
might_sleep();
@@ -3248,7 +3249,7 @@ static inline void __generic_make_request(struct bio *bio)
bdevname(bio->bi_bdev, b),
(long long) bio->bi_sector);
end_io:
- bio_endio(bio, -EIO);
+ bio_endio(bio, err);
break;
}
@@ -3283,6 +3284,10 @@ end_io:
if (bio_check_eod(bio, nr_sectors))
goto end_io;
+ if (bio_empty_barrier(bio) && !q->prepare_flush_fn) {
+ err = -EOPNOTSUPP;
+ goto end_io;
+ }
ret = q->make_request_fn(q, bio);
} while (ret);