From: Filipe David Borba Manana Date: Mon, 5 Aug 2013 15:25:12 +0000 (+0100) Subject: Btrfs: return ENOSPC when target space is full X-Git-Tag: v3.12-rc1~40^2~70 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09fb99a696412ae0fceeafc06c987903416503b9;p=pandora-kernel.git Btrfs: return ENOSPC when target space is full In extent-tree.c:do_chunk_alloc(), early on we returned 0 (success) when the target space was full and when chunk allocation is needed. However, later on in that same function we return ENOSPC if btrfs_alloc_chunk() fails (and chunk allocation was needed) and set the space's full flag. This was inconsistent, as -ENOSPC should be returned if the space is full and a chunk allocation needs to performed. If the space is full but no chunk allocation is needed, just return 0 (success). Signed-off-by: Filipe David Borba Manana Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed