Skip to content

Commit 5af9f55

Browse files
johnpgarryDarrick J. Wong
authored andcommitted
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> [djwong: add an underscore to be consistent with everything else] Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: John Garry <[email protected]>
1 parent 84270a1 commit 5af9f55

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

fs/xfs/xfs_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ xfs_file_open(
14881488
if (xfs_is_shutdown(XFS_M(inode->i_sb)))
14891489
return -EIO;
14901490
file->f_mode |= FMODE_NOWAIT | FMODE_CAN_ODIRECT;
1491-
if (xfs_inode_can_atomicwrite(XFS_I(inode)))
1491+
if (xfs_inode_can_hw_atomic_write(XFS_I(inode)))
14921492
file->f_mode |= FMODE_CAN_ATOMIC_WRITE;
14931493
return generic_file_open(inode, file);
14941494
}

fs/xfs/xfs_inode.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,7 @@ static inline bool xfs_inode_has_bigrtalloc(const struct xfs_inode *ip)
356356
(XFS_IS_REALTIME_INODE(ip) ? \
357357
(ip)->i_mount->m_rtdev_targp : (ip)->i_mount->m_ddev_targp)
358358

359-
static inline bool
360-
xfs_inode_can_atomicwrite(
361-
struct xfs_inode *ip)
359+
static inline bool xfs_inode_can_hw_atomic_write(const struct xfs_inode *ip)
362360
{
363361
struct xfs_mount *mp = ip->i_mount;
364362
struct xfs_buftarg *target = xfs_inode_buftarg(ip);

fs/xfs/xfs_iops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ xfs_report_atomic_write(
608608
{
609609
unsigned int unit_min = 0, unit_max = 0;
610610

611-
if (xfs_inode_can_atomicwrite(ip))
611+
if (xfs_inode_can_hw_atomic_write(ip))
612612
unit_min = unit_max = ip->i_mount->m_sb.sb_blocksize;
613613
generic_fill_statx_atomic_writes(stat, unit_min, unit_max, 0);
614614
}

0 commit comments

Comments
 (0)