From: Darrick J. Wong Date: Mon, 15 Apr 2024 21:54:12 +0000 (-0700) Subject: xfs: constify xfs_bmap_is_written_extent X-Git-Tag: v6.10-rc1~87^2~72^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15f78aa3eb07645e7bef15a53b4ae1c757907d2c;p=thirdparty%2Fkernel%2Flinux.git xfs: constify xfs_bmap_is_written_extent This predicate doesn't modify the structure that's being passed in, so we can mark it const. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h index f7662595309d8..b8bdbf1560e65 100644 --- a/fs/xfs/libxfs/xfs_bmap.h +++ b/fs/xfs/libxfs/xfs_bmap.h @@ -158,7 +158,7 @@ static inline bool xfs_bmap_is_real_extent(const struct xfs_bmbt_irec *irec) * Return true if the extent is a real, allocated extent, or false if it is a * delayed allocation, and unwritten extent or a hole. */ -static inline bool xfs_bmap_is_written_extent(struct xfs_bmbt_irec *irec) +static inline bool xfs_bmap_is_written_extent(const struct xfs_bmbt_irec *irec) { return xfs_bmap_is_real_extent(irec) && irec->br_state != XFS_EXT_UNWRITTEN;