diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-03 12:53:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-03 12:53:43 -0700 |
commit | 0d617928f5f5426f6e40edaacbfa80e73d67e0cd (patch) | |
tree | f2db31399c1fde4e25b078a911f0e0a5234e305f | |
parent | 7fd21be75dce605e7cf273bd64b6d733d422fb04 (diff) | |
parent | 2c8fc867602e385fd2abe76da0b6bda8ed907547 (diff) | |
download | linux-0d617928f5f5426f6e40edaacbfa80e73d67e0cd.tar.bz2 |
Merge git://github.com/davem330/ide
* git://github.com/davem330/ide:
ide-disk: Fix request requeuing
-rw-r--r-- | drivers/ide/ide-disk.c | 7 |
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); |