diff options
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 0f58616bcd7f..b5c5c4a9e3f0 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -220,6 +220,15 @@ new_segment: | |||
220 | bvprv = bvec; | 220 | bvprv = bvec; |
221 | } /* segments in rq */ | 221 | } /* segments in rq */ |
222 | 222 | ||
223 | |||
224 | if (unlikely(rq->cmd_flags & REQ_COPY_USER) && | ||
225 | (rq->data_len & q->dma_pad_mask)) { | ||
226 | unsigned int pad_len = (q->dma_pad_mask & ~rq->data_len) + 1; | ||
227 | |||
228 | sg->length += pad_len; | ||
229 | rq->extra_len += pad_len; | ||
230 | } | ||
231 | |||
223 | if (q->dma_drain_size && q->dma_drain_needed(rq)) { | 232 | if (q->dma_drain_size && q->dma_drain_needed(rq)) { |
224 | if (rq->cmd_flags & REQ_RW) | 233 | if (rq->cmd_flags & REQ_RW) |
225 | memset(q->dma_drain_buffer, 0, q->dma_drain_size); | 234 | memset(q->dma_drain_buffer, 0, q->dma_drain_size); |