[PATCH 2/4] block: use submit_bio_noacct_add_head for split bio sending back

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Danny Shih <dannyshih@xxxxxxxxxxxx>

Use submit_bio_noacct_add_head when sending split bio back to itself.
Otherwise, it might be handled after the lately split bio.

Signed-off-by: Danny Shih <dannyshih@xxxxxxxxxxxx>
Reviewed-by: Allen Peng <allenpeng@xxxxxxxxxxxx>
Reviewed-by: Alex Wu <alexwu@xxxxxxxxxxxx>
---
 block/blk-merge.c | 2 +-
 block/bounce.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 808768f..e6ddcef0 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -347,7 +347,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
 
 		bio_chain(split, *bio);
 		trace_block_split(split, (*bio)->bi_iter.bi_sector);
-		submit_bio_noacct(*bio);
+		submit_bio_noacct_add_head(*bio);
 		*bio = split;
 	}
 }
diff --git a/block/bounce.c b/block/bounce.c
index d3f51ac..0b4db65 100644
--- a/block/bounce.c
+++ b/block/bounce.c
@@ -308,7 +308,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,
 	if (!passthrough && sectors < bio_sectors(*bio_orig)) {
 		bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split);
 		bio_chain(bio, *bio_orig);
-		submit_bio_noacct(*bio_orig);
+		submit_bio_noacct_add_head(*bio_orig);
 		*bio_orig = bio;
 	}
 	bio = bounce_clone_bio(*bio_orig, GFP_NOIO, passthrough ? NULL :
-- 
2.7.4




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux