]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fuse: rework fuse_do_ioctl()
authorMaxim Patlasov <mpatlasov@parallels.com>
Fri, 26 Oct 2012 15:49:13 +0000 (19:49 +0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 6 Nov 2012 12:09:36 +0000 (13:09 +0100)
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 <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/file.c

index ba505bc86de690c8d61efcd881ba37e3bb83f841..d5d23dedf0fe6ad28f94bd857604b6d43d6696ad 100644 (file)
@@ -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;