From: Gerhard Heift Date: Thu, 30 Jan 2014 15:23:59 +0000 (+0100) Subject: btrfs: tree_search, copy_to_sk: return EOVERFLOW for too small buffer X-Git-Tag: omap-for-v3.16/fixes-against-rc1~14^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f5f6178f366bdb93d6af6f2bdca8ebca1ad9fe9;p=pandora-kernel.git btrfs: tree_search, copy_to_sk: return EOVERFLOW for too small buffer In copy_to_sk, if an item is too large for the given buffer, it now returns -EOVERFLOW instead of copying a search_header with len = 0. For backward compatibility for the first item it still copies such a header to the buffer, but not any other following items, which could have fitted. tree_search changes -EOVERFLOW back to 0 to behave similiar to the way it behaved before this patch. Signed-off-by: Gerhard Heift Signed-off-by: Chris Mason Acked-by: David Sterba --- Reading git-diff-tree failed