From: Martin K. Petersen Date: Tue, 22 Mar 2011 04:27:42 +0000 (-0400) Subject: sd: Fail discard requests when logical block provisioning has been disabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09b9cc44c942256026bf7a63fec2155b8f488899;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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; }