summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2021-06-23 15:48:53 +0200
committerDavid Sterba <dsterba@suse.com>2021-08-23 13:18:58 +0200
commitb3b7e1d0b4c2d80e7be8248305f6f47e46329e7e (patch)
tree23d73afbae8de32b3f9619b8640c52272bf8dabd /fs/btrfs/ctree.c
parent5a80d1c6a2704d880c1df30315a1d9b0dc1f2cd8 (diff)
btrfs: add special case to setget helpers for 64k pages
On 64K pages the size of the extent_buffer::pages array is 1 and compilation with -Warray-bounds warns due to kaddr = page_address(eb->pages[idx + 1]); when reading byte range crossing page boundary. This does never actually overflow the array because on 64K because all the data fit in one page and bounds are checked by check_setget_bounds. To fix the reported overflows and warnings add a compile-time condition that will allow compiler to eliminate the dead code that reads from the idx + 1 page. Link: https://lore.kernel.org/lkml/20210623083901.1d49d19d@canb.auug.org.au/ CC: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
0 files changed, 0 insertions, 0 deletions