fuse: allocate page array more efficiently
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 1 Oct 2018 08:07:05 +0000 (10:07 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 1 Oct 2018 08:07:05 +0000 (10:07 +0200)
commit8a7aa286ab67d7dfac8abbefab899597b5977c9a
tree58bfd88424d09350e17f3084e83b02112e042c6c
parentab2257e9941b9ef28d4a4a451e4b146d40a21e18
fuse: allocate page array more efficiently

When allocating page array for a request the array for the page pointers
and the array for page descriptors are allocated by two separate kmalloc()
calls.  Merge these into one allocation.

Also instead of initializing the request and the page arrays with memset(),
use the zeroing allocation variants.

Reserved requests never carry pages (page array size is zero). Make that
explicit by initializing the page array pointers to NULL and make sure the
assumption remains true by adding a WARN_ON().

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c