]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomic_write()
authorJohn Garry <john.g.garry@oracle.com>
Wed, 7 May 2025 21:18:23 +0000 (14:18 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 7 May 2025 21:25:30 +0000 (14:25 -0700)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
[djwong: add an underscore to be consistent with everything else]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
fs/xfs/xfs_file.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_iops.c

index 84f08c976ac49b9e415802b5f4b37b91e9bdad4c..55bdae44e42a9908b01d00640c9efd5946dcd67a 100644 (file)
@@ -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);
 }
index eae0159983ca21f38284f09100208d793026c398..d3471a7418b938152d758ea830533012098ce226 100644 (file)
@@ -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);
index f0e5d83195df7140aeb7d441d37b17a25a6bda61..22432c300fd7e31501d65f38f8da4eb42d4bac0a 100644 (file)
@@ -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);
 }