mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 05:11:46 +00:00
xfs: convert beX_add to beX_add_cpu (new common API)
remove beX_add functions and replace all uses with beX_add_cpu Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by: Dave Chinner <dgc@sgi.com> Cc: Timothy Shimmin <tes@sgi.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
91d35dd93e
commit
413d57c990
17 changed files with 114 additions and 129 deletions
|
@ -592,7 +592,7 @@ xfs_alloc_ag_vextent(
|
|||
if (!(args->wasfromfl)) {
|
||||
|
||||
agf = XFS_BUF_TO_AGF(args->agbp);
|
||||
be32_add(&agf->agf_freeblks, -(args->len));
|
||||
be32_add_cpu(&agf->agf_freeblks, -(args->len));
|
||||
xfs_trans_agblocks_delta(args->tp,
|
||||
-((long)(args->len)));
|
||||
args->pag->pagf_freeblks -= args->len;
|
||||
|
@ -1720,7 +1720,7 @@ xfs_free_ag_extent(
|
|||
|
||||
agf = XFS_BUF_TO_AGF(agbp);
|
||||
pag = &mp->m_perag[agno];
|
||||
be32_add(&agf->agf_freeblks, len);
|
||||
be32_add_cpu(&agf->agf_freeblks, len);
|
||||
xfs_trans_agblocks_delta(tp, len);
|
||||
pag->pagf_freeblks += len;
|
||||
XFS_WANT_CORRUPTED_GOTO(
|
||||
|
@ -2008,18 +2008,18 @@ xfs_alloc_get_freelist(
|
|||
* Get the block number and update the data structures.
|
||||
*/
|
||||
bno = be32_to_cpu(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)]);
|
||||
be32_add(&agf->agf_flfirst, 1);
|
||||
be32_add_cpu(&agf->agf_flfirst, 1);
|
||||
xfs_trans_brelse(tp, agflbp);
|
||||
if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp))
|
||||
agf->agf_flfirst = 0;
|
||||
pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)];
|
||||
be32_add(&agf->agf_flcount, -1);
|
||||
be32_add_cpu(&agf->agf_flcount, -1);
|
||||
xfs_trans_agflist_delta(tp, -1);
|
||||
pag->pagf_flcount--;
|
||||
|
||||
logflags = XFS_AGF_FLFIRST | XFS_AGF_FLCOUNT;
|
||||
if (btreeblk) {
|
||||
be32_add(&agf->agf_btreeblks, 1);
|
||||
be32_add_cpu(&agf->agf_btreeblks, 1);
|
||||
pag->pagf_btreeblks++;
|
||||
logflags |= XFS_AGF_BTREEBLKS;
|
||||
}
|
||||
|
@ -2117,17 +2117,17 @@ xfs_alloc_put_freelist(
|
|||
be32_to_cpu(agf->agf_seqno), &agflbp)))
|
||||
return error;
|
||||
agfl = XFS_BUF_TO_AGFL(agflbp);
|
||||
be32_add(&agf->agf_fllast, 1);
|
||||
be32_add_cpu(&agf->agf_fllast, 1);
|
||||
if (be32_to_cpu(agf->agf_fllast) == XFS_AGFL_SIZE(mp))
|
||||
agf->agf_fllast = 0;
|
||||
pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)];
|
||||
be32_add(&agf->agf_flcount, 1);
|
||||
be32_add_cpu(&agf->agf_flcount, 1);
|
||||
xfs_trans_agflist_delta(tp, 1);
|
||||
pag->pagf_flcount++;
|
||||
|
||||
logflags = XFS_AGF_FLLAST | XFS_AGF_FLCOUNT;
|
||||
if (btreeblk) {
|
||||
be32_add(&agf->agf_btreeblks, -1);
|
||||
be32_add_cpu(&agf->agf_btreeblks, -1);
|
||||
pag->pagf_btreeblks--;
|
||||
logflags |= XFS_AGF_BTREEBLKS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue