Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db0a2e0099be3a1cff55879225881465f16c67d3
Commit:     db0a2e0099be3a1cff55879225881465f16c67d3
Parent:     2fb98e8414c42cb14698833aac640b143b9ade4f
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 19 11:36:55 2008 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Tue Feb 19 11:36:55 2008 +0100

    block: clear drain buffer if draining for write command
    
    Clear drain buffer before chaining if the command in question is a
    write.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/blk-merge.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index bef1b4d..7506c4f 100644
--- 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),
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to