From: Zhaolei Date: Thu, 6 Aug 2015 13:56:58 +0000 (+0800) Subject: btrfs: abort transaction on btrfs_reloc_cow_block() X-Git-Tag: omap-for-v4.3/fixes-rc1~86^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93314e3b64fd2e77237fdba7cfcc0d38dcd05579;p=pandora-kernel.git btrfs: abort transaction on btrfs_reloc_cow_block() When btrfs_reloc_cow_block() failed in __btrfs_cow_block(), current code just return a err-value to caller, but leave new_created extent buffer exist and locked. Then subsequent code (in relocate) try to lock above eb again, and caused deadlock without any dmesg. (eb lock use wait_event(), so no lockdep message) It is hard to do recover work in __btrfs_cow_block() at this error point, but we can abort transaction to avoid deadlock and operate on unstable state.a It also helps developer to find wrong place quickly. (better than a frozen fs without any dmesg before patch) Signed-off-by: Zhao Lei Signed-off-by: Chris Mason --- Reading git-diff-tree failed