diff options
author | Nathan Scott <nathans@sgi.com> | 2006-01-31 20:14:52 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-31 20:14:52 -0500 |
commit | fad3aa1e8e2e4123a19b926fefd91ec63dd56497 (patch) | |
tree | 77fc99e0bc94385e1b0b7fc0b9891fa5c180892d /fs/xfs/linux-2.6/xfs_buf.c | |
parent | 3a69c7dc6f3d58aeb9ce5051fc7060d55e05c003 (diff) |
[XFS] Fix regression in xfs_buf_rele dealing with non-hashed buffers, as
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>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index e44b7c1a3a36..a36a8e3b703f 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -822,6 +822,13 @@ xfs_buf_rele( | |||
822 | 822 | ||
823 | XB_TRACE(bp, "rele", bp->b_relse); | 823 | XB_TRACE(bp, "rele", bp->b_relse); |
824 | 824 | ||
825 | if (unlikely(!hash)) { | ||
826 | ASSERT(!bp->b_relse); | ||
827 | if (atomic_dec_and_test(&bp->b_hold)) | ||
828 | xfs_buf_free(bp); | ||
829 | return; | ||
830 | } | ||
831 | |||
825 | if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) { | 832 | if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) { |
826 | if (bp->b_relse) { | 833 | if (bp->b_relse) { |
827 | atomic_inc(&bp->b_hold); | 834 | atomic_inc(&bp->b_hold); |