diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-02-13 18:03:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-13 19:21:19 -0500 |
commit | 413d57c9907c72ed608df2be72ef8ed13a3eeb46 (patch) | |
tree | 92f98a1219915d2d72589b24a04232fccf3a40f2 /fs/xfs/xfs_ialloc.c | |
parent | 91d35dd93e14c34539a8005183ea500f25caad02 (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 1409c2d61c11..c5836b951d0c 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -301,8 +301,8 @@ xfs_ialloc_ag_alloc( | |||
301 | } | 301 | } |
302 | xfs_trans_inode_alloc_buf(tp, fbuf); | 302 | xfs_trans_inode_alloc_buf(tp, fbuf); |
303 | } | 303 | } |
304 | be32_add(&agi->agi_count, newlen); | 304 | be32_add_cpu(&agi->agi_count, newlen); |
305 | be32_add(&agi->agi_freecount, newlen); | 305 | be32_add_cpu(&agi->agi_freecount, newlen); |
306 | agno = be32_to_cpu(agi->agi_seqno); | 306 | agno = be32_to_cpu(agi->agi_seqno); |
307 | down_read(&args.mp->m_peraglock); | 307 | down_read(&args.mp->m_peraglock); |
308 | args.mp->m_perag[agno].pagi_freecount += newlen; | 308 | args.mp->m_perag[agno].pagi_freecount += newlen; |
@@ -885,7 +885,7 @@ nextag: | |||
885 | if ((error = xfs_inobt_update(cur, rec.ir_startino, rec.ir_freecount, | 885 | if ((error = xfs_inobt_update(cur, rec.ir_startino, rec.ir_freecount, |
886 | rec.ir_free))) | 886 | rec.ir_free))) |
887 | goto error0; | 887 | goto error0; |
888 | be32_add(&agi->agi_freecount, -1); | 888 | be32_add_cpu(&agi->agi_freecount, -1); |
889 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); | 889 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); |
890 | down_read(&mp->m_peraglock); | 890 | down_read(&mp->m_peraglock); |
891 | mp->m_perag[tagno].pagi_freecount--; | 891 | mp->m_perag[tagno].pagi_freecount--; |
@@ -1065,8 +1065,8 @@ xfs_difree( | |||
1065 | * to be freed when the transaction is committed. | 1065 | * to be freed when the transaction is committed. |
1066 | */ | 1066 | */ |
1067 | ilen = XFS_IALLOC_INODES(mp); | 1067 | ilen = XFS_IALLOC_INODES(mp); |
1068 | be32_add(&agi->agi_count, -ilen); | 1068 | be32_add_cpu(&agi->agi_count, -ilen); |
1069 | be32_add(&agi->agi_freecount, -(ilen - 1)); | 1069 | be32_add_cpu(&agi->agi_freecount, -(ilen - 1)); |
1070 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); | 1070 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); |
1071 | down_read(&mp->m_peraglock); | 1071 | down_read(&mp->m_peraglock); |
1072 | mp->m_perag[agno].pagi_freecount -= ilen - 1; | 1072 | mp->m_perag[agno].pagi_freecount -= ilen - 1; |
@@ -1095,7 +1095,7 @@ xfs_difree( | |||
1095 | /* | 1095 | /* |
1096 | * Change the inode free counts and log the ag/sb changes. | 1096 | * Change the inode free counts and log the ag/sb changes. |
1097 | */ | 1097 | */ |
1098 | be32_add(&agi->agi_freecount, 1); | 1098 | be32_add_cpu(&agi->agi_freecount, 1); |
1099 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); | 1099 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); |
1100 | down_read(&mp->m_peraglock); | 1100 | down_read(&mp->m_peraglock); |
1101 | mp->m_perag[agno].pagi_freecount++; | 1101 | mp->m_perag[agno].pagi_freecount++; |