Skip to content

Commit

Permalink
scsi: remove unused free discard page in sd_done
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Aug 7, 2010
1 parent f1126e9 commit 802447c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 802447c

Please sign in to comment.