]> err.no Git - linux-2.6/blobdiff - fs/xfs/linux-2.6/xfs_buf.c
[XFS] implement IHOLD/IRELE directly
[linux-2.6] / fs / xfs / linux-2.6 / xfs_buf.c
index 9cc8f0213095b92e868fa396b099bc13c2a2ec47..9f45c74f1a840a649b7d30bedd11d0514291862e 100644 (file)
@@ -838,6 +838,7 @@ xfs_buf_rele(
                return;
        }
 
+       ASSERT(atomic_read(&bp->b_hold) > 0);
        if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {
                if (bp->b_relse) {
                        atomic_inc(&bp->b_hold);
@@ -851,11 +852,6 @@ xfs_buf_rele(
                        spin_unlock(&hash->bh_lock);
                        xfs_buf_free(bp);
                }
-       } else {
-               /*
-                * Catch reference count leaks
-                */
-               ASSERT(atomic_read(&bp->b_hold) >= 0);
        }
 }