Skip to content
Commit 8f5f6178 authored by Gerhard Heift's avatar Gerhard Heift Committed by Chris Mason
Browse files

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: default avatarGerhard Heift <Gerhard@Heift.Name>
Signed-off-by: default avatarChris Mason <clm@fb.com>
Acked-by: default avatarDavid Sterba <dsterba@suse.cz>
parent 12544442
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment