diff options
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++; |