sd: simplify the ZBC case in provisioning_mode_store
authorChristoph Hellwig <hch@lst.de>
Fri, 31 May 2024 07:48:00 +0000 (09:48 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 14 Jun 2024 16:19:44 +0000 (10:19 -0600)
commitb3491b0db165c0cbe25874da66d97652c03db654
tree493b32491500c4db0c906f206e199a8ad1d1e74e
parenta23634644afc2f7c1bac98776440a1f3b161819e
sd: simplify the ZBC case in provisioning_mode_store

Don't reset the discard settings to no-op over and over when a user
writes to the provisioning attribute as that is already the default
mode for ZBC devices.  In hindsight we should have made writing to
the attribute fail for ZBC devices, but the code has probably been
around for far too long to change this now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240531074837.1648501-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd.c