From: Miao Xie Date: Thu, 27 Feb 2014 05:58:05 +0000 (+0800) Subject: Btrfs: fix preallocate vs double nocow write X-Git-Tag: v3.15-rc1~96^2~49 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2b70851f862b68714f357d2926adbb6c574fdd;p=pandora-kernel.git Btrfs: fix preallocate vs double nocow write We can not release the reserved metadata space for the first write if we find the write position is pre-allocated. Because the kernel might write the data on the disk before we do the second write but after the can-nocow check, if we release the space for the first write, we might fail to update the metadata because of no space. Fix this problem by end nocow write if there is dirty data in the range whose space is pre-allocated. Signed-off-by: Miao Xie Signed-off-by: Josef Bacik --- Reading git-diff-tree failed