]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: ignore discard return value
authorChaitanya Kulkarni <ckulkarnilinux@gmail.com>
Mon, 24 Nov 2025 23:48:06 +0000 (15:48 -0800)
committerCarlos Maiolino <cem@kernel.org>
Tue, 16 Dec 2025 07:49:56 +0000 (08:49 +0100)
commit2145f447b79ab522667cbdbdab4525c903759f7c
tree5f1724e37a5fdb0bce060dd341f7d0f71b4f1537
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8
xfs: ignore discard return value

__blkdev_issue_discard() always returns 0, making all error checking
in XFS discard functions dead code.

Change xfs_discard_extents() return type to void, remove error variable,
error checking, and error logging for the __blkdev_issue_discard() call
in same function.

Update xfs_trim_perag_extents() and xfs_trim_rtgroup_extents() to
ignore the xfs_discard_extents() return value and error checking
code.

Update xfs_discard_rtdev_extents() to ignore __blkdev_issue_discard()
return value and error checking code.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_discard.c
fs/xfs/xfs_discard.h