Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297219
b: refs/heads/master
c: d97d32e
h: refs/heads/master
i:
  297217: b64a4c6
  297215: b46e23f
v: v3
  • Loading branch information
Jan Kara authored and Ben Myers committed Mar 27, 2012
1 parent 7bdb6c3 commit 32a9dbf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 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: a66d636385d621e98a915233250356c394a437de
refs/heads/master: d97d32edcd732110758799ae60af725e5110b3dc
33 changes: 11 additions & 22 deletions trunk/fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -3161,37 +3161,26 @@ xlog_recover_process_iunlinks(
*/
continue;
}
/*
* Unlock the buffer so that it can be acquired in the normal
* course of the transaction to truncate and free each inode.
* Because we are not racing with anyone else here for the AGI
* buffer, we don't even need to hold it locked to read the
* initial unlinked bucket entries out of the buffer. We keep
* buffer reference though, so that it stays pinned in memory
* while we need the buffer.
*/
agi = XFS_BUF_TO_AGI(agibp);
xfs_buf_unlock(agibp);

for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++) {
agino = be32_to_cpu(agi->agi_unlinked[bucket]);
while (agino != NULLAGINO) {
/*
* Release the agi buffer so that it can
* be acquired in the normal course of the
* transaction to truncate and free the inode.
*/
xfs_buf_relse(agibp);

agino = xlog_recover_process_one_iunlink(mp,
agno, agino, bucket);

/*
* Reacquire the agibuffer and continue around
* the loop. This should never fail as we know
* the buffer was good earlier on.
*/
error = xfs_read_agi(mp, NULL, agno, &agibp);
ASSERT(error == 0);
agi = XFS_BUF_TO_AGI(agibp);
}
}

/*
* Release the buffer for the current agi so we can
* go on to the next one.
*/
xfs_buf_relse(agibp);
xfs_buf_rele(agibp);
}

mp->m_dmevmask = mp_dmevmask;
Expand Down

0 comments on commit 32a9dbf

Please sign in to comment.