diff options
author | Christoph Hellwig <hch@lst.de> | 2024-09-10 07:39:07 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-09-10 12:14:15 +0300 |
commit | 4bceb9ba05aca23652567fb5f899cc7fcb12c8d0 (patch) | |
tree | e77d1fd08e3a11076491ec552efd22bdbf27cac3 /fs/xfs | |
parent | 492f53758fad4fde3e9a98696780f8b53f87cdae (diff) | |
download | linux-4bceb9ba05aca23652567fb5f899cc7fcb12c8d0.tar.xz |
iomap: remove the iomap_file_buffered_write_punch_delalloc return value
iomap_file_buffered_write_punch_delalloc can only return errors if either
the ->punch callback returned an error, or if someone changed the API of
mapping_seek_hole_data to return a negative error code that is not
-ENXIO.
As the only instance of ->punch never returns an error, an such an error
would be fatal anyway remove the entire error propagation and don't
return an error code from iomap_file_buffered_write_punch_delalloc.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240910043949.3481298-6-hch@lst.de
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 695e5bee776f..1e11f48814c0 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1208,7 +1208,7 @@ out_unlock: return error; } -static int +static void xfs_buffered_write_delalloc_punch( struct inode *inode, loff_t offset, @@ -1216,7 +1216,6 @@ xfs_buffered_write_delalloc_punch( struct iomap *iomap) { xfs_bmap_punch_delalloc_range(XFS_I(inode), offset, offset + length); - return 0; } static int @@ -1228,18 +1227,8 @@ xfs_buffered_write_iomap_end( unsigned flags, struct iomap *iomap) { - - struct xfs_mount *mp = XFS_M(inode->i_sb); - int error; - - error = iomap_file_buffered_write_punch_delalloc(inode, offset, length, - written, flags, iomap, - &xfs_buffered_write_delalloc_punch); - if (error && !xfs_is_shutdown(mp)) { - xfs_alert(mp, "%s: unable to clean up ino 0x%llx", - __func__, XFS_I(inode)->i_ino); - return error; - } + iomap_file_buffered_write_punch_delalloc(inode, offset, length, written, + flags, iomap, &xfs_buffered_write_delalloc_punch); return 0; } |