summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-08-08 11:04:44 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:00 +0200
commita9c701e594669dd49fed448c27c64f20cfacc8a7 (patch)
treef5524a3612ccbfa758a2b9808111297d7ba17698 /block/blk-core.c
parent7a67f63b3233ff28e753854fe27891c44f8588ae (diff)
block: use bio_has_data() to check for data carrying bio
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 2cba5ef97b2b..54e442ba44aa 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1490,10 +1490,7 @@ void submit_bio(int rw, struct bio *bio)
* If it's a regular read/write or a barrier with data attached,
* go through the normal accounting stuff before submission.
*/
- if (!bio_empty_barrier(bio)) {
-
- BIO_BUG_ON(!bio->bi_size);
- BIO_BUG_ON(!bio->bi_io_vec);
+ if (bio_has_data(bio)) {
if (rw & WRITE) {
count_vm_events(PGPGOUT, count);