]> git.karo-electronics.de Git - linux-beck.git/commitdiff
scsi: remove unused free discard page in sd_done
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 1 Jul 2010 10:49:19 +0000 (19:49 +0900)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:23:51 +0000 (18:23 +0200)
- sd_done isn't called for pc request so we never call the code.
- we use sd_unprep to free discard page now.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/scsi/sd.c

index 2d4e3a865f39d07f7f03cdbf24cbb678dd5513f6..aa6b48ba78b10dd4260a720c2a690bfe6cc37ad9 100644 (file)
@@ -1179,15 +1179,6 @@ static int sd_done(struct scsi_cmnd *SCpnt)
        int sense_valid = 0;
        int sense_deferred = 0;
 
-       /*
-        * If this is a discard request that originated from the kernel
-        * we need to free our payload here.  Note that we need to check
-        * the request flag as the normal payload rules apply for
-        * pass-through UNMAP / WRITE SAME requests.
-        */
-       if (SCpnt->request->cmd_flags & REQ_DISCARD)
-               __free_page(bio_page(SCpnt->request->bio));
-
        if (result) {
                sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr);
                if (sense_valid)