From: Filipe Manana Date: Mon, 3 Nov 2014 14:12:57 +0000 (+0000) Subject: Btrfs: avoid premature -ENOMEM in clear_extent_bit() X-Git-Tag: omap-for-v3.19/fixes-rc1~111^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7bc6319c59cc791743cf1b6e98f86be69444495;p=pandora-kernel.git Btrfs: avoid premature -ENOMEM in clear_extent_bit() We try to allocate an extent state structure before acquiring the extent state tree's spinlock as we might need a new one later and therefore avoid doing later an atomic allocation while holding the tree's spinlock. However we returned -ENOMEM if that initial non-atomic allocation failed, which is a bit excessive since we might end up not needing the pre-allocated extent state at all - for the case where the tree doesn't have any extent states that cover the input range and cover too any other range. Therefore don't return -ENOMEM if that pre-allocation fails. Signed-off-by: Filipe Manana Signed-off-by: Chris Mason --- Reading git-diff-tree failed