aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/rmap.c
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <darrick.wong@oracle.com> 2018-12-12 08:46:23 -0800
committerGravatar Darrick J. Wong <darrick.wong@oracle.com> 2018-12-12 08:47:16 -0800
commit66e3237e724c6650dca03627b40bb00a812d3f7a (patch)
tree84a31606547b538fb2e8fb4dd5b732f0444c53fb /fs/xfs/scrub/rmap.c
parentxfs: streamline defer op type handling (diff)
downloadlinux-66e3237e724c6650dca03627b40bb00a812d3f7a.tar.gz
linux-66e3237e724c6650dca03627b40bb00a812d3f7a.tar.bz2
linux-66e3237e724c6650dca03627b40bb00a812d3f7a.zip
xfs: const-ify xfs_owner_info arguments
Only certain functions actually change the contents of an xfs_owner_info; the rest can accept a const struct pointer. This will enable us to save stack space by hoisting static owner info types to be const global variables. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/rmap.c')
-rw-r--r--fs/xfs/scrub/rmap.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/xfs/scrub/rmap.c b/fs/xfs/scrub/rmap.c
index 5e293c129813..8a5bf15d544d 100644
--- a/fs/xfs/scrub/rmap.c
+++ b/fs/xfs/scrub/rmap.c
@@ -184,14 +184,14 @@ xchk_rmapbt(
/* xref check that the extent is owned by a given owner */
static inline void
xchk_xref_check_owner(
- struct xfs_scrub *sc,
- xfs_agblock_t bno,
- xfs_extlen_t len,
- struct xfs_owner_info *oinfo,
- bool should_have_rmap)
+ struct xfs_scrub *sc,
+ xfs_agblock_t bno,
+ xfs_extlen_t len,
+ const struct xfs_owner_info *oinfo,
+ bool should_have_rmap)
{
- bool has_rmap;
- int error;
+ bool has_rmap;
+ int error;
if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm))
return;
@@ -207,10 +207,10 @@ xchk_xref_check_owner(
/* xref check that the extent is owned by a given owner */
void
xchk_xref_is_owned_by(
- struct xfs_scrub *sc,
- xfs_agblock_t bno,
- xfs_extlen_t len,
- struct xfs_owner_info *oinfo)
+ struct xfs_scrub *sc,
+ xfs_agblock_t bno,
+ xfs_extlen_t len,
+ const struct xfs_owner_info *oinfo)
{
xchk_xref_check_owner(sc, bno, len, oinfo, true);
}
@@ -218,10 +218,10 @@ xchk_xref_is_owned_by(
/* xref check that the extent is not owned by a given owner */
void
xchk_xref_is_not_owned_by(
- struct xfs_scrub *sc,
- xfs_agblock_t bno,
- xfs_extlen_t len,
- struct xfs_owner_info *oinfo)
+ struct xfs_scrub *sc,
+ xfs_agblock_t bno,
+ xfs_extlen_t len,
+ const struct xfs_owner_info *oinfo)
{
xchk_xref_check_owner(sc, bno, len, oinfo, false);
}