mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
ide: fix memory leak when flush command is issued
I'm using ide on 2.6.30.1 with xfs filesystem. I noticed a kernel memory leak after writing lots of data, the kmalloc-96 slab cache keeps growing. It seems the struct ide_cmd kmalloced by idedisk_prepare_flush is never kfreed. Commita09485df9c
("ide: move request type specific code from ide_end_drive_cmd() to callers (v3)") andf505d49ffd
("ide: fix barriers support") cause this regression, cmd->rq must now be set for ide_complete_cmd to honor the IDE_TFLAG_DYN flag. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3503e0acbf
commit
bc146d23d1
1 changed files with 1 additions and 0 deletions
|
@ -455,6 +455,7 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
|
|||
|
||||
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
|
||||
rq->special = cmd;
|
||||
cmd->rq = rq;
|
||||
}
|
||||
|
||||
ide_devset_get(multcount, mult_count);
|
||||
|
|
Loading…
Reference in a new issue