From: Richard Purdie Date: Fri, 31 Mar 2006 10:31:15 +0000 (-0800) Subject: [PATCH] Ensure ide-taskfile calls any driver specific end_request function X-Git-Tag: v2.6.17-rc1~64 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03731fbdd09f8db4af86dbf437e3169fb1920d5e;p=linux-2.6 [PATCH] Ensure ide-taskfile calls any driver specific end_request function Ensure ide-taskfile.c calls any driver specific end_request function if present. Signed-off-by: Richard Purdie Cc: Alan Cox Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 0606bd2f60..9233b8109a 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -375,7 +375,13 @@ static void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) } } - ide_end_request(drive, 1, rq->hard_nr_sectors); + if (rq->rq_disk) { + ide_driver_t *drv; + + drv = *(ide_driver_t **)rq->rq_disk->private_data;; + drv->end_request(drive, 1, rq->hard_nr_sectors); + } else + ide_end_request(drive, 1, rq->hard_nr_sectors); } /*