From c7b42a3c370a51f0dfe42c138f1366e383e01ed6 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 1 Feb 2006 12:14:52 +1100 Subject: [PATCH] --- yaml --- r: 19282 b: refs/heads/master c: fad3aa1e8e2e4123a19b926fefd91ec63dd56497 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_buf.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0306905901d7..42cfdbfe3957 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a69c7dc6f3d58aeb9ce5051fc7060d55e05c003 +refs/heads/master: fad3aa1e8e2e4123a19b926fefd91ec63dd56497 diff --git a/trunk/fs/xfs/linux-2.6/xfs_buf.c b/trunk/fs/xfs/linux-2.6/xfs_buf.c index e44b7c1a3a36..a36a8e3b703f 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_buf.c +++ b/trunk/fs/xfs/linux-2.6/xfs_buf.c @@ -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);