Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fad3aa1e authored by Nathan Scott's avatar Nathan Scott
Browse files

[XFS] Fix regression in xfs_buf_rele dealing with non-hashed buffers, as


occur during log replay.  Novell bug 145204, Fedora bug 177848.

SGI-PV: 948860
SGI-Modid: xfs-linux-melb:xfs-kern:25064a

Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 3a69c7dc
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -822,6 +822,13 @@ xfs_buf_rele(


	XB_TRACE(bp, "rele", bp->b_relse);
	XB_TRACE(bp, "rele", bp->b_relse);


	if (unlikely(!hash)) {
		ASSERT(!bp->b_relse);
		if (atomic_dec_and_test(&bp->b_hold))
			xfs_buf_free(bp);
		return;
	}

	if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {
	if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {
		if (bp->b_relse) {
		if (bp->b_relse) {
			atomic_inc(&bp->b_hold);
			atomic_inc(&bp->b_hold);