Bugzilla – Attachment #65575: Possible fix for xfs_buf_rele panic for bug #145204
-- a/fs/xfs/linux-2.6/xfs_buf.c
++ b/fs/xfs/linux-2.6/xfs_buf.c
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);