xfs: constify xfs_bmap_is_written_extent
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:12 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:12 +0000 (14:54 -0700)
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>
fs/xfs/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;