drivers/md/bcache/super.c: use kvmalloc
authorMichal Hocko <mhocko@suse.com>
Mon, 8 May 2017 22:57:37 +0000 (15:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 May 2017 00:15:13 +0000 (17:15 -0700)
commitbc4e54f6e966e9ca35064cd60f91b1478c07a1b2
tree125ce2441c6a621067bcf346c8cc6a04aef2b1b7
parentd224e938189771dbd1e3b68ee8603a949bee76bb
drivers/md/bcache/super.c: use kvmalloc

bcache_device_init uses kmalloc for small requests and vmalloc for those
which are larger than 64 pages.  This alone is a strange criterion.
Moreover kmalloc can fallback to vmalloc on the failure.  Let's simply
use kvmalloc instead as it knows how to handle the fallback properly

Link: http://lkml.kernel.org/r/20170306103327.2766-5-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/bcache/super.c