]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:30 +0000 (12:50 +0100)
commit6bdbb75ffc6cf58513d6785da8885252aac235e0
tree505973b7211f2ff3e00af287a426d1d0b8d1a167
parent4e9af1ddbc98ea6fbecb075678c071d34269dc18
xfs: Add error handling for xfs_reflink_cancel_cow_range

commit 26b63bee2f6e711c5a169997fd126fddcfb90848 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_inode.c