summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2011-03-22 07:27:42 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 19:35:53 +0300
commit09b9cc44c942256026bf7a63fec2155b8f488899 (patch)
tree642695cd3f1622a3c52dcd6c2b941ac9b72780c9
parentc62b3898636072de4bf9af36b6cd5a920ebfe896 (diff)
downloadlinux-09b9cc44c942256026bf7a63fec2155b8f488899.tar.xz
sd: Fail discard requests when logical block provisioning has been disabled
Ensure that we kill discard requests after logical block provisioning has been disabled in sysfs. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/scsi/sd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3be5db5d6343..7ff61d76b4c5 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -597,6 +597,7 @@ static int scsi_setup_discard_cmnd(struct scsi_device *sdp, struct request *rq)
break;
default:
+ ret = BLKPREP_KILL;
goto out;
}