From 99f0c65bd28c99de855251a5d82f2ca306b4da72 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 2 Nov 2005 15:09:35 +1100 Subject: [PATCH] --- yaml --- r: 12215 b: refs/heads/master c: 7f14d0a013eeae8f8548e9ac10699465de2adacc h: refs/heads/master i: 12213: dd569c0f69cff10af152a812dd2a984f08a19743 12211: d19bbe89ff85d5160f32ac2ac3e11a3ac9d9fea5 12207: a4e7cb15965f786c18c8c2f50f368d877e8ecfa4 v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_buf.c | 29 ++++------------------------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/[refs] b/[refs] index 01be938275ca..02c64558bbc7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e718eeb4fe397f8add9f789e1fc3b47da4e7275f +refs/heads/master: 7f14d0a013eeae8f8548e9ac10699465de2adacc diff --git a/trunk/fs/xfs/linux-2.6/xfs_buf.c b/trunk/fs/xfs/linux-2.6/xfs_buf.c index e22cce1a9d5d..a764ded9f3a0 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_buf.c +++ b/trunk/fs/xfs/linux-2.6/xfs_buf.c @@ -830,39 +830,18 @@ pagebuf_rele( PB_TRACE(pb, "rele", pb->pb_relse); - /* - * pagebuf_lookup buffers are not hashed, not delayed write, - * and don't have their own release routines. Special case. - */ - 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)) { - int do_free = 1; - if (pb->pb_relse) { atomic_inc(&pb->pb_hold); spin_unlock(&hash->bh_lock); (*(pb->pb_relse)) (pb); - spin_lock(&hash->bh_lock); - do_free = 0; - } - - if (pb->pb_flags & PBF_FS_MANAGED) { - do_free = 0; - } - - if (do_free) { - ASSERT((pb->pb_flags & (PBF_DELWRI|_PBF_DELWRI_Q)) == 0); - list_del_init(&pb->pb_hash_list); + } else if (pb->pb_flags & PBF_FS_MANAGED) { spin_unlock(&hash->bh_lock); - pagebuf_free(pb); } else { + ASSERT(!(pb->pb_flags & (PBF_DELWRI|_PBF_DELWRI_Q))); + list_del_init(&pb->pb_hash_list); spin_unlock(&hash->bh_lock); + pagebuf_free(pb); } } else { /*