Skip to content
Commit a1fbc675 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by David Sterba
Browse files

btrfs: fix potential overflow in cluster_pages_for_defrag on 32bit arch



On 32-bit systems, this shift will overflow for files larger than 4GB as
start_index is unsigned long while the calls to btrfs_delalloc_*_space
expect u64.

CC: stable@vger.kernel.org # 4.4+
Fixes: df480633 ("btrfs: extent-tree: Switch to new delalloc space reserve and release")
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
[ define the variable instead of repeating the shift ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d5c82388
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment