]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: tree_search, copy_to_sk: return EOVERFLOW for too small buffer
authorGerhard Heift <gerhard@heift.name>
Thu, 30 Jan 2014 15:23:59 +0000 (16:23 +0100)
committerChris Mason <clm@fb.com>
Fri, 13 Jun 2014 01:21:39 +0000 (18:21 -0700)
commit694540e6a0f51d46633c380ea514516e499980ee
treea2e697a397615dad07bb8665f5d8ec86cd481062
parent1294a00f8fb400fda272a7db7e755b7cb88b30ec
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 <Gerhard@Heift.Name>
Signed-off-by: Chris Mason <clm@fb.com>
Acked-by: David Sterba <dsterba@suse.cz>
fs/btrfs/ioctl.c