nvmet: ignore discard return value
authorChaitanya Kulkarni <kch@nvidia.com>
Wed, 11 Feb 2026 20:44:37 +0000 (12:44 -0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Feb 2026 11:23:53 +0000 (04:23 -0700)
commit38d12f15c4772b5383b1249b2afb0d206a430f0f
tree0fccc1886e35f8e4b9536a68d1cf1b5998fdc353
parent699fcfb6cb80a9df67fd2086a1c930d196d709f2
nvmet: ignore discard return value

__blkdev_issue_discard() always returns 0, making the error checking
in nvmet_bdev_discard_range() dead code.

Kill the function nvmet_bdev_discard_range() and call
__blkdev_issue_discard() directly from nvmet_bdev_execute_discard(),
since no error handling is needed anymore for __blkdev_issue_discard()
call.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/io-cmd-bdev.c