From: Josef Bacik Date: Sun, 24 Jul 2011 19:45:34 +0000 (-0400) Subject: Btrfs: fix deadlock when throttling transactions X-Git-Tag: v3.1-rc1~134^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81317fdeddcef259b6ecf7b5c0d04caa167c6b54;p=pandora-kernel.git Btrfs: fix deadlock when throttling transactions Hit this nice little deadlock. What happens is this __btrfs_end_transaction with throttle set, --use_count so it equals 0 btrfs_commit_transaction btrfs_end_transaction --use_count so now its -1 <== BAD we just return and wait on the transaction This is bad because we just return after our use_count is -1 and don't let go of our num_writer count on the transaction, so the guy committing the transaction just sits there forever. Fix this by inc'ing our use_count if we're going to call commit_transaction so that if we call btrfs_end_transaction it's valid. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed