diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2011-03-22 00:27:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 09:35:53 -0700 |
commit | 09b9cc44c942256026bf7a63fec2155b8f488899 (patch) | |
tree | 642695cd3f1622a3c52dcd6c2b941ac9b72780c9 | |
parent | c62b3898636072de4bf9af36b6cd5a920ebfe896 (diff) | |
download | linux-3.10-09b9cc44c942256026bf7a63fec2155b8f488899.tar.gz linux-3.10-09b9cc44c942256026bf7a63fec2155b8f488899.tar.bz2 linux-3.10-09b9cc44c942256026bf7a63fec2155b8f488899.zip |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 3be5db5d634..7ff61d76b4c 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; } |