diff options
author | Nathan Scott <nathans@sgi.com> | 2006-02-02 13:30:43 +1100 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-02-09 23:20:07 -0800 |
commit | e7a9850f9a29508eb9ba7f43e733b01096bc171d (patch) | |
tree | 91d16e23589509ad4ae649fc56a3fd2315c6fadc | |
parent | 6eef6ea5bf6794c2d0938ba1c91934229ad9873e (diff) |
[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: Nathan Scott <nathans@sgi.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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 6fe21d2b884..422848c23b0 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -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); |