From: Liu Bo Date: Thu, 29 Mar 2012 13:57:44 +0000 (-0400) Subject: Btrfs: fix deadlock during allocating chunks X-Git-Tag: v3.4-rc1~22^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15d1ff8111aad85d8b40ee396758990d17a2caac;p=pandora-kernel.git Btrfs: fix deadlock during allocating chunks This deadlock comes from xfstests 251. We'll hold the chunk_mutex throughout the whole of a chunk allocation. But if we find that we've used up system chunk space, we need to allocate a new system chunk, but this will lead to a recursion of chunk allocation and end up with a deadlock on chunk_mutex. So instead we need to allocate the system chunk first if we find we're in ENOSPC. Signed-off-by: Liu Bo Signed-off-by: Chris Mason --- Reading git-diff-tree failed