From: FUJITA Tomonori Date: Thu, 1 Jul 2010 10:49:19 +0000 (+0900) Subject: scsi: remove unused free discard page in sd_done X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=802447c1c0513a0ea0e29d6bda23b19ac0686654;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git scsi: remove unused free discard page in sd_done - 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 Signed-off-by: Jens Axboe --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 2d4e3a865f39..aa6b48ba78b1 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -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)