From: Maxim Patlasov Date: Fri, 26 Oct 2012 15:49:13 +0000 (+0400) Subject: fuse: rework fuse_do_ioctl() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54b966702dafe396b6f4e609f222b8e0fdb4d7a4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git fuse: rework fuse_do_ioctl() fuse_do_ioctl() already calculates the number of pages it's going to use. It is stored in 'num_pages' variable. So the patch simply uses it for allocating fuse_req. Signed-off-by: Maxim Patlasov Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/file.c b/fs/fuse/file.c index b9972502f43a..fdb5b33198aa 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1894,7 +1894,7 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, num_pages++; } - req = fuse_get_req(fc, FUSE_MAX_PAGES_PER_REQ); + req = fuse_get_req(fc, num_pages); if (IS_ERR(req)) { err = PTR_ERR(req); req = NULL;