aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-07 12:59:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-07 12:59:44 -0500
commit2a75184d52f41db1f54ad9eee7fa8b3ad820f4ac (patch)
tree126192eee76510426ee08b9f3a2197ff766a0d50 /fs
parent8ab47d3ec77d94ad9a6bb01efd696e1e34cfe80d (diff)
parent739c3eea711a255df5ed1246face0a4dce5e589f (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Small collection of fixes for 3.14-rc. It contains: - Three minor update to blk-mq from Christoph. - Reduce number of unaligned (< 4kb) in-flight writes on mtip32xx to two. From Micron. - Make the blk-mq CPU notify spinlock raw, since it can't be a sleeper spinlock on RT. From Mike Galbraith. - Drop now bogus BUG_ON() for bio iteration with blk integrity. From Nic Bellinger. - Properly propagate the SYNC flag on requests. From Shaohua" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: add REQ_SYNC early rt,blk,mq: Make blk_mq_cpu_notify_lock a raw spinlock bio-integrity: Drop bio_integrity_verify BUG_ON in post bip->bip_iter world blk-mq: support partial I/O completions blk-mq: merge blk_mq_insert_request and blk_mq_run_request blk-mq: remove blk_mq_alloc_rq mtip32xx: Reduce the number of unaligned writes to 2
Diffstat (limited to 'fs')
-rw-r--r--fs/bio-integrity.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
index 0129b78a6908..4f70f383132c 100644
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@ -458,11 +458,10 @@ static int bio_integrity_verify(struct bio *bio)
458 struct blk_integrity_exchg bix; 458 struct blk_integrity_exchg bix;
459 struct bio_vec *bv; 459 struct bio_vec *bv;
460 sector_t sector = bio->bi_integrity->bip_iter.bi_sector; 460 sector_t sector = bio->bi_integrity->bip_iter.bi_sector;
461 unsigned int sectors, total, ret; 461 unsigned int sectors, ret = 0;
462 void *prot_buf = bio->bi_integrity->bip_buf; 462 void *prot_buf = bio->bi_integrity->bip_buf;
463 int i; 463 int i;
464 464
465 ret = total = 0;
466 bix.disk_name = bio->bi_bdev->bd_disk->disk_name; 465 bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
467 bix.sector_size = bi->sector_size; 466 bix.sector_size = bi->sector_size;
468 467
@@ -484,8 +483,6 @@ static int bio_integrity_verify(struct bio *bio)
484 sectors = bv->bv_len / bi->sector_size; 483 sectors = bv->bv_len / bi->sector_size;
485 sector += sectors; 484 sector += sectors;
486 prot_buf += sectors * bi->tuple_size; 485 prot_buf += sectors * bi->tuple_size;
487 total += sectors * bi->tuple_size;
488 BUG_ON(total > bio->bi_integrity->bip_iter.bi_size);
489 486
490 kunmap_atomic(kaddr); 487 kunmap_atomic(kaddr);
491 } 488 }