btrfs: Fix stack smash with node size > 4Ksyslinux-6.03-pre12
commitf19697b255863ab8d614df346b033a1aec668db6
authorH. Peter Anvin <hpa@zytor.com>
Tue, 27 May 2014 00:30:30 +0000 (26 17:30 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 27 May 2014 00:30:30 +0000 (26 17:30 -0700)
tree6c3af309879d6f7c714504b6a169cfcf73d55a05
parent7e7139788c8ac6ffbf474976ad4d1727e0677b9f
btrfs: Fix stack smash with node size > 4K

Newer btrfs has a node size of more than 4K.  Make sure we have a
buffer big enough to hold a node -- instead of allocating it on the
stack, allocate it at startup time.

While changing this code, remove a completely unnecessary arbitrary
64-bit divide.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/fs/btrfs/btrfs.c
core/fs/btrfs/btrfs.h