Skip to content

Commit

Permalink
[XFS] Fix regression in xfs_buf_rele dealing with non-hashed buffers, as
Browse files Browse the repository at this point in the history
occur during log replay.  Novell bug 145204, Fedora bug 177848.

SGI-PV: 948860
SGI-Modid: xfs-linux-melb:xfs-kern:25064a

Signed-off-by: Nathan Scott <nathans@sgi.com>
  • Loading branch information
Nathan Scott committed Feb 1, 2006
1 parent 3a69c7d commit fad3aa1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,13 @@ xfs_buf_rele(

XB_TRACE(bp, "rele", bp->b_relse);

if (unlikely(!hash)) {
ASSERT(!bp->b_relse);
if (atomic_dec_and_test(&bp->b_hold))
xfs_buf_free(bp);
return;
}

if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {
if (bp->b_relse) {
atomic_inc(&bp->b_hold);
Expand Down

0 comments on commit fad3aa1

Please sign in to comment.