[2.6.38-rc6, patch] fix delayed_refs locking on error path...

From: Daniel J Blueman
Date: Tue Mar 01 2011 - 11:08:13 EST


Correctly unlock delayed_refs in the error case.

Signed-off-by: Daniel J Blueman <daniel.blueman@xxxxxxxxx>

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index e1aa8d6..c48d699 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2787,6 +2787,7 @@ static int btrfs_destroy_delayed_refs(struct
btrfs_transaction *trans,
spin_lock(&delayed_refs->lock);
if (delayed_refs->num_entries == 0) {
printk(KERN_INFO "delayed_refs has NO entry\n");
+ spin_unlock(&delayed_refs->lock);
return ret;
}

--
Daniel J Blueman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/