btrfs: fallback to vmalloc in btrfs_compare_tree
authorDavid Sterba <dsterba@suse.com>
Wed, 30 Mar 2016 14:01:12 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2016 01:35:17 +0000 (18:35 -0700)
commit440323f92e3542110978dcbca890aad8b3798c34
treef962e9cdebccf0c0373593eee74fcea9af46158d
parent52ec554945bb69c7bd9790ce11338566b25ba293
btrfs: fallback to vmalloc in btrfs_compare_tree

commit 8f282f71eaee7ac979cdbe525f76daa0722798a8 upstream.

The allocation of node could fail if the memory is too fragmented for a
given node size, practically observed with 64k.

http://article.gmane.org/gmane.comp.file-systems.btrfs/54689

Reported-and-tested-by: Jean-Denis Girard <jd.girard@sysnux.pf>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/ctree.c