[PATCH 6/6] fuse: rework fuse_do_ioctl()

From: Maxim Patlasov
Date: Fri Sep 07 2012 - 13:41:56 EST


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.
---
fs/fuse/file.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 84cc83c..abb070b 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1885,7 +1885,7 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
num_pages++;
}

- req = fuse_get_req_multipage(fc, FUSE_MAX_PAGES_PER_REQ);
+ req = fuse_get_req_multipage(fc, num_pages);
if (IS_ERR(req)) {
err = PTR_ERR(req);
req = NULL;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/