summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-03 12:53:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-03 12:53:43 -0700
commit0d617928f5f5426f6e40edaacbfa80e73d67e0cd (patch)
treef2db31399c1fde4e25b078a911f0e0a5234e305f /drivers
parent7fd21be75dce605e7cf273bd64b6d733d422fb04 (diff)
parent2c8fc867602e385fd2abe76da0b6bda8ed907547 (diff)
Merge git://github.com/davem330/ide
* git://github.com/davem330/ide: ide-disk: Fix request requeuing
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-disk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 274798068a54..16f69be820c7 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -435,7 +435,12 @@ static int idedisk_prep_fn(struct request_queue *q, struct request *rq)
if (!(rq->cmd_flags & REQ_FLUSH))
return BLKPREP_OK;
- cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
+ if (rq->special) {
+ cmd = rq->special;
+ memset(cmd, 0, sizeof(*cmd));
+ } else {
+ cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
+ }
/* FIXME: map struct ide_taskfile on rq->cmd[] */
BUG_ON(cmd == NULL);