xfs: Propagate errors from xfs_reflink_cancel_cow_range in xfs_dax_write_iomap_end
commitfb95897b8cupstream. In xfs_dax_write_iomap_end(), directly return the result of xfs_reflink_cancel_cow_range() when !written, ensuring proper error propagation and improving code robustness. Fixes:ea6c49b784("xfs: support CoW in fsdax mode") Cc: stable@vger.kernel.org # v6.0 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a525fcaa1
commit
1af7697727
+2
-4
@@ -923,10 +923,8 @@ xfs_dax_write_iomap_end(
|
||||
if (!xfs_is_cow_inode(ip))
|
||||
return 0;
|
||||
|
||||
if (!written) {
|
||||
xfs_reflink_cancel_cow_range(ip, pos, length, true);
|
||||
return 0;
|
||||
}
|
||||
if (!written)
|
||||
return xfs_reflink_cancel_cow_range(ip, pos, length, true);
|
||||
|
||||
return xfs_reflink_end_cow(ip, pos, written);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user