projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fb98e8
)
block: clear drain buffer if draining for write command
author
Tejun Heo
<htejun@gmail.com>
Tue, 19 Feb 2008 10:36:55 +0000
(11:36 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 19 Feb 2008 10:36:55 +0000
(11:36 +0100)
Clear drain buffer before chaining if the command in question is a
write.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-merge.c
patch
|
blob
|
blame
|
history
diff --git
a/block/blk-merge.c
b/block/blk-merge.c
index bef1b4d0fc02304faaacc57d3495fc47ccd84d0a..7506c4fe0264bd6038d24108f5438fea42478508 100644
(file)
--- a/
block/blk-merge.c
+++ b/
block/blk-merge.c
@@
-221,6
+221,9
@@
new_segment:
} /* segments in rq */
if (q->dma_drain_size && q->dma_drain_needed(rq)) {
+ if (rq->cmd_flags & REQ_RW)
+ memset(q->dma_drain_buffer, 0, q->dma_drain_size);
+
sg->page_link &= ~0x02;
sg = sg_next(sg);
sg_set_page(sg, virt_to_page(q->dma_drain_buffer),