From: John Garry Date: Wed, 7 May 2025 21:18:23 +0000 (-0700) Subject: xfs: rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomic_write() X-Git-Tag: v6.16-rc1~209^2~4^2^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5af9f5508477f088320fdce6c0fd69f960aee319;p=thirdparty%2Fkernel%2Flinux.git xfs: rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomic_write() In future we will want to be able to check if specifically HW offload-based atomic writes are possible, so rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomicwrite(). Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig [djwong: add an underscore to be consistent with everything else] Signed-off-by: Darrick J. Wong Signed-off-by: John Garry --- diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 84f08c976ac49..55bdae44e42a9 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1488,7 +1488,7 @@ xfs_file_open( if (xfs_is_shutdown(XFS_M(inode->i_sb))) return -EIO; file->f_mode |= FMODE_NOWAIT | FMODE_CAN_ODIRECT; - if (xfs_inode_can_atomicwrite(XFS_I(inode))) + if (xfs_inode_can_hw_atomic_write(XFS_I(inode))) file->f_mode |= FMODE_CAN_ATOMIC_WRITE; return generic_file_open(inode, file); } diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index eae0159983ca2..d3471a7418b93 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -356,9 +356,7 @@ static inline bool xfs_inode_has_bigrtalloc(const struct xfs_inode *ip) (XFS_IS_REALTIME_INODE(ip) ? \ (ip)->i_mount->m_rtdev_targp : (ip)->i_mount->m_ddev_targp) -static inline bool -xfs_inode_can_atomicwrite( - struct xfs_inode *ip) +static inline bool xfs_inode_can_hw_atomic_write(const struct xfs_inode *ip) { struct xfs_mount *mp = ip->i_mount; struct xfs_buftarg *target = xfs_inode_buftarg(ip); diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index f0e5d83195df7..22432c300fd7e 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -608,7 +608,7 @@ xfs_report_atomic_write( { unsigned int unit_min = 0, unit_max = 0; - if (xfs_inode_can_atomicwrite(ip)) + if (xfs_inode_can_hw_atomic_write(ip)) unit_min = unit_max = ip->i_mount->m_sb.sb_blocksize; generic_fill_statx_atomic_writes(stat, unit_min, unit_max, 0); }