diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-12 11:46:23 -0500 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-12 11:47:16 -0500 |
commit | 66e3237e724c6650dca03627b40bb00a812d3f7a (patch) | |
tree | 84a31606547b538fb2e8fb4dd5b732f0444c53fb /fs/xfs/libxfs/xfs_alloc.h | |
parent | 02b100fb83f9b0f8719deef6c4ed973b4d9ce00c (diff) |
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/libxfs/xfs_alloc.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h index 00cd5ec4cb6b..d6ed5d2c07c2 100644 --- a/fs/xfs/libxfs/xfs_alloc.h +++ b/fs/xfs/libxfs/xfs_alloc.h | |||
@@ -182,7 +182,7 @@ __xfs_free_extent( | |||
182 | struct xfs_trans *tp, /* transaction pointer */ | 182 | struct xfs_trans *tp, /* transaction pointer */ |
183 | xfs_fsblock_t bno, /* starting block number of extent */ | 183 | xfs_fsblock_t bno, /* starting block number of extent */ |
184 | xfs_extlen_t len, /* length of extent */ | 184 | xfs_extlen_t len, /* length of extent */ |
185 | struct xfs_owner_info *oinfo, /* extent owner */ | 185 | const struct xfs_owner_info *oinfo, /* extent owner */ |
186 | enum xfs_ag_resv_type type, /* block reservation type */ | 186 | enum xfs_ag_resv_type type, /* block reservation type */ |
187 | bool skip_discard); | 187 | bool skip_discard); |
188 | 188 | ||
@@ -191,7 +191,7 @@ xfs_free_extent( | |||
191 | struct xfs_trans *tp, | 191 | struct xfs_trans *tp, |
192 | xfs_fsblock_t bno, | 192 | xfs_fsblock_t bno, |
193 | xfs_extlen_t len, | 193 | xfs_extlen_t len, |
194 | struct xfs_owner_info *oinfo, | 194 | const struct xfs_owner_info *oinfo, |
195 | enum xfs_ag_resv_type type) | 195 | enum xfs_ag_resv_type type) |
196 | { | 196 | { |
197 | return __xfs_free_extent(tp, bno, len, oinfo, type, false); | 197 | return __xfs_free_extent(tp, bno, len, oinfo, type, false); |