From: Miao Xie Date: Fri, 18 Nov 2011 09:43:00 +0000 (+0800) Subject: Btrfs: fix deadlock on metadata reservation when evicting a inode X-Git-Tag: v3.2-rc4~3^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa38a711a893accf5b5192f3d705a120deaa81e0;p=pandora-kernel.git Btrfs: fix deadlock on metadata reservation when evicting a inode When I ran the xfstests, I found the test tasks was blocked on meta-data reservation. By debugging, I found the reason of this bug: start transaction | v reserve meta-data space | v flush delay allocation -> iput inode -> evict inode ^ | | v wait for delay allocation flush <- reserve meta-data space And besides that, the flush on evicting inode will block the thread, which is reclaiming the memory, and make oom happen easily. Fix this bug by skipping the flush step when evicting inode. Signed-off-by: Miao Xie --- Reading git-diff-tree failed