Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329031
b: refs/heads/master
c: c498211
h: refs/heads/master
i:
  329029: 1042aa1
  329027: 3700faa
  329023: fbe1fc4
v: v3
  • Loading branch information
Christoph Hellwig authored and Ben Myers committed Aug 16, 2012
1 parent 3b130cc commit d35cc87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ed845df60f3f02d4b7cd9fcad79ccb69c289f5c
refs/heads/master: c4982110ae93d7575503feb81d15e93c0c5f393c
17 changes: 9 additions & 8 deletions trunk/fs/xfs/xfs_ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,23 +962,22 @@ xfs_dialloc(
if (!pag->pagi_freecount && !okalloc)
goto nextag;

/*
* Then read in the AGI buffer and recheck with the AGI buffer
* lock held.
*/
error = xfs_ialloc_read_agi(mp, tp, agno, &agbp);
if (error)
goto out_error;

/*
* Once the AGI has been read in we have to recheck
* pagi_freecount with the AGI buffer lock held.
*/
if (pag->pagi_freecount) {
xfs_perag_put(pag);
goto out_alloc;
}

if (!okalloc) {
xfs_trans_brelse(tp, agbp);
goto nextag;
}
if (!okalloc)
goto nextag_relse_buffer;


error = xfs_ialloc_ag_alloc(tp, agbp, &ialloced);
if (error) {
Expand Down Expand Up @@ -1007,6 +1006,8 @@ xfs_dialloc(
return 0;
}

nextag_relse_buffer:
xfs_trans_brelse(tp, agbp);
nextag:
xfs_perag_put(pag);
if (++agno == mp->m_sb.sb_agcount)
Expand Down

0 comments on commit d35cc87

Please sign in to comment.