From 09b9cc44c942256026bf7a63fec2155b8f488899 Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Tue, 22 Mar 2011 00:27:42 -0400 Subject: [PATCH] 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 Reported-by: Geert Uytterhoeven Reviewed-by: Jeff Moyer Signed-off-by: Linus Torvalds --- drivers/scsi/sd.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.20.1