Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12215
b: refs/heads/master
c: 7f14d0a
h: refs/heads/master
i:
  12213: dd569c0
  12211: d19bbe8
  12207: a4e7cb1
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Nov 2, 2005
1 parent bf55129 commit 99f0c65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e718eeb4fe397f8add9f789e1fc3b47da4e7275f
refs/heads/master: 7f14d0a013eeae8f8548e9ac10699465de2adacc
29 changes: 4 additions & 25 deletions trunk/fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/*
Expand Down

0 comments on commit 99f0c65

Please sign in to comment.