Commit e7a9850f authored by Nathan Scott's avatar Nathan Scott Committed by Chris Wright

[PATCH] fix regression in xfs_buf_rele

Fix regression in xfs_buf_rele dealing with non-hashed buffers, as
occur during log replay.  Novell bug 145204, Fedora bug 177848.
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6eef6ea5
......@@ -830,6 +830,13 @@ pagebuf_rele(
PB_TRACE(pb, "rele", pb->pb_relse);
if (unlikely(!hash)) {
ASSERT(!pb->pb_relse);
if (atomic_dec_and_test(&pb->pb_hold))
xfs_buf_free(pb);
return;
}
if (atomic_dec_and_lock(&pb->pb_hold, &hash->bh_lock)) {
if (pb->pb_relse) {
atomic_inc(&pb->pb_hold);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment