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>
This commit is contained in:
@@ -182,7 +182,7 @@ __xfs_free_extent(
|
||||
struct xfs_trans *tp, /* transaction pointer */
|
||||
xfs_fsblock_t bno, /* starting block number of extent */
|
||||
xfs_extlen_t len, /* length of extent */
|
||||
struct xfs_owner_info *oinfo, /* extent owner */
|
||||
const struct xfs_owner_info *oinfo, /* extent owner */
|
||||
enum xfs_ag_resv_type type, /* block reservation type */
|
||||
bool skip_discard);
|
||||
|
||||
@@ -191,7 +191,7 @@ xfs_free_extent(
|
||||
struct xfs_trans *tp,
|
||||
xfs_fsblock_t bno,
|
||||
xfs_extlen_t len,
|
||||
struct xfs_owner_info *oinfo,
|
||||
const struct xfs_owner_info *oinfo,
|
||||
enum xfs_ag_resv_type type)
|
||||
{
|
||||
return __xfs_free_extent(tp, bno, len, oinfo, type, false);
|
||||
|
||||
Reference in New Issue
Block a user