]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: constify xfs_bmap_is_written_extent
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:34 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:00:59 +0000 (17:00 -0700)
Source kernel commit: 15f78aa3eb07645e7bef15a53b4ae1c757907d2c

This predicate doesn't modify the structure that's being passed in, so
we can mark it const.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_bmap.h

index f7662595309d8611ec5de1a731fb7bdaf5097d87..b8bdbf1560e658f41e4f6b329349e2cf217ca815 100644 (file)
@@ -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;