]> asedeno.scripts.mit.edu Git - linux.git/commit
btrfs: Check if item pointer overlaps with the item itself
authorQu Wenruo <quwenruo.btrfs@gmx.com>
Wed, 23 Aug 2017 07:57:57 +0000 (16:57 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:58 +0000 (12:27 +0100)
commit7f43d4affb2a254d421ab20b0cf65ac2569909fb
tree385315443ada8869218f57cf52330f270aad9f10
parentc3267bbaa9cae09b62960eafe33ad19196803285
btrfs: Check if item pointer overlaps with the item itself

Function check_leaf() checks if any item pointer points outside of the
leaf, but it doesn't check if the pointer overlaps with the item itself.

Normally only the last item may be the victim, but adding such check is
never a bad idea anyway.

Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c