diff options
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/xfs_alloc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index ea6aa60ace06..bdbfbbee4959 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -592,7 +592,7 @@ xfs_alloc_ag_vextent( | |||
592 | if (!(args->wasfromfl)) { | 592 | if (!(args->wasfromfl)) { |
593 | 593 | ||
594 | agf = XFS_BUF_TO_AGF(args->agbp); | 594 | agf = XFS_BUF_TO_AGF(args->agbp); |
595 | be32_add(&agf->agf_freeblks, -(args->len)); | 595 | be32_add_cpu(&agf->agf_freeblks, -(args->len)); |
596 | xfs_trans_agblocks_delta(args->tp, | 596 | xfs_trans_agblocks_delta(args->tp, |
597 | -((long)(args->len))); | 597 | -((long)(args->len))); |
598 | args->pag->pagf_freeblks -= args->len; | 598 | args->pag->pagf_freeblks -= args->len; |
@@ -1720,7 +1720,7 @@ xfs_free_ag_extent( | |||
1720 | 1720 | ||
1721 | agf = XFS_BUF_TO_AGF(agbp); | 1721 | agf = XFS_BUF_TO_AGF(agbp); |
1722 | pag = &mp->m_perag[agno]; | 1722 | pag = &mp->m_perag[agno]; |
1723 | be32_add(&agf->agf_freeblks, len); | 1723 | be32_add_cpu(&agf->agf_freeblks, len); |
1724 | xfs_trans_agblocks_delta(tp, len); | 1724 | xfs_trans_agblocks_delta(tp, len); |
1725 | pag->pagf_freeblks += len; | 1725 | pag->pagf_freeblks += len; |
1726 | XFS_WANT_CORRUPTED_GOTO( | 1726 | XFS_WANT_CORRUPTED_GOTO( |
@@ -2008,18 +2008,18 @@ xfs_alloc_get_freelist( | |||
2008 | * Get the block number and update the data structures. | 2008 | * Get the block number and update the data structures. |
2009 | */ | 2009 | */ |
2010 | bno = be32_to_cpu(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)]); | 2010 | bno = be32_to_cpu(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)]); |
2011 | be32_add(&agf->agf_flfirst, 1); | 2011 | be32_add_cpu(&agf->agf_flfirst, 1); |
2012 | xfs_trans_brelse(tp, agflbp); | 2012 | xfs_trans_brelse(tp, agflbp); |
2013 | if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp)) | 2013 | if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp)) |
2014 | agf->agf_flfirst = 0; | 2014 | agf->agf_flfirst = 0; |
2015 | pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)]; | 2015 | pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)]; |
2016 | be32_add(&agf->agf_flcount, -1); | 2016 | be32_add_cpu(&agf->agf_flcount, -1); |
2017 | xfs_trans_agflist_delta(tp, -1); | 2017 | xfs_trans_agflist_delta(tp, -1); |
2018 | pag->pagf_flcount--; | 2018 | pag->pagf_flcount--; |
2019 | 2019 | ||
2020 | logflags = XFS_AGF_FLFIRST | XFS_AGF_FLCOUNT; | 2020 | logflags = XFS_AGF_FLFIRST | XFS_AGF_FLCOUNT; |
2021 | if (btreeblk) { | 2021 | if (btreeblk) { |
2022 | be32_add(&agf->agf_btreeblks, 1); | 2022 | be32_add_cpu(&agf->agf_btreeblks, 1); |
2023 | pag->pagf_btreeblks++; | 2023 | pag->pagf_btreeblks++; |
2024 | logflags |= XFS_AGF_BTREEBLKS; | 2024 | logflags |= XFS_AGF_BTREEBLKS; |
2025 | } | 2025 | } |
@@ -2117,17 +2117,17 @@ xfs_alloc_put_freelist( | |||
2117 | be32_to_cpu(agf->agf_seqno), &agflbp))) | 2117 | be32_to_cpu(agf->agf_seqno), &agflbp))) |
2118 | return error; | 2118 | return error; |
2119 | agfl = XFS_BUF_TO_AGFL(agflbp); | 2119 | agfl = XFS_BUF_TO_AGFL(agflbp); |
2120 | be32_add(&agf->agf_fllast, 1); | 2120 | be32_add_cpu(&agf->agf_fllast, 1); |
2121 | if (be32_to_cpu(agf->agf_fllast) == XFS_AGFL_SIZE(mp)) | 2121 | if (be32_to_cpu(agf->agf_fllast) == XFS_AGFL_SIZE(mp)) |
2122 | agf->agf_fllast = 0; | 2122 | agf->agf_fllast = 0; |
2123 | pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)]; | 2123 | pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)]; |
2124 | be32_add(&agf->agf_flcount, 1); | 2124 | be32_add_cpu(&agf->agf_flcount, 1); |
2125 | xfs_trans_agflist_delta(tp, 1); | 2125 | xfs_trans_agflist_delta(tp, 1); |
2126 | pag->pagf_flcount++; | 2126 | pag->pagf_flcount++; |
2127 | 2127 | ||
2128 | logflags = XFS_AGF_FLLAST | XFS_AGF_FLCOUNT; | 2128 | logflags = XFS_AGF_FLLAST | XFS_AGF_FLCOUNT; |
2129 | if (btreeblk) { | 2129 | if (btreeblk) { |
2130 | be32_add(&agf->agf_btreeblks, -1); | 2130 | be32_add_cpu(&agf->agf_btreeblks, -1); |
2131 | pag->pagf_btreeblks--; | 2131 | pag->pagf_btreeblks--; |
2132 | logflags |= XFS_AGF_BTREEBLKS; | 2132 | logflags |= XFS_AGF_BTREEBLKS; |
2133 | } | 2133 | } |