diff options
author | Christoph Hellwig <hch@lst.de> | 2024-08-27 09:50:49 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-28 17:53:58 +0300 |
commit | 72f4d525709b6450d181fcfcc296d879f3d0b249 (patch) | |
tree | 7158940d02ceac706755e3deb5f8aad2151974da /fs/xfs/xfs_bmap_util.c | |
parent | 1df1d3b2dcaa8a4ff736bf6351ca1a15d924a40f (diff) | |
download | linux-72f4d525709b6450d181fcfcc296d879f3d0b249.tar.xz |
xfs: move the xfs_is_always_cow_inode check into xfs_alloc_file_space
Move the xfs_is_always_cow_inode check from the caller into
xfs_alloc_file_space to prepare for refactoring of xfs_file_fallocate.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240827065123.1762168-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/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 187a0dbda24f..e9fdebaa40ea 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -653,6 +653,9 @@ xfs_alloc_file_space( xfs_bmbt_irec_t imaps[1], *imapp; int error; + if (xfs_is_always_cow_inode(ip)) + return 0; + trace_xfs_alloc_file_space(ip); if (xfs_is_shutdown(mp)) |