]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: Add error handling for xfs_reflink_cancel_cow_range
authorWentao Liang <vulab@iscas.ac.cn>
Fri, 24 Jan 2025 03:45:09 +0000 (11:45 +0800)
committerCarlos Maiolino <cem@kernel.org>
Mon, 27 Jan 2025 10:42:48 +0000 (11:42 +0100)
commit26b63bee2f6e711c5a169997fd126fddcfb90848
tree466d29255fb4c2df3227f18c35dc80a933b1f373
parentfb95897b8c60653805aa09daec575ca30983f768
xfs: Add error handling for xfs_reflink_cancel_cow_range

In xfs_inactive(), xfs_reflink_cancel_cow_range() is called
without error handling, risking unnoticed failures and
inconsistent behavior compared to other parts of the code.

Fix this issue by adding an error handling for the
xfs_reflink_cancel_cow_range(), improving code robustness.

Fixes: 6231848c3aa5 ("xfs: check for cow blocks before trying to clear them")
Cc: stable@vger.kernel.org # v4.17
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_inode.c