public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxim Patlasov <mpatlasov@parallels.com>
To: miklos@szeredi.hu
Cc: fuse-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	devel@openvz.org
Subject: [PATCH 6/6] fuse: rework fuse_do_ioctl()
Date: Fri, 07 Sep 2012 21:41:59 +0400	[thread overview]
Message-ID: <20120907174154.1343.22158.stgit@maximpc.sw.ru> (raw)
In-Reply-To: <20120907172536.1343.80497.stgit@maximpc.sw.ru>

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;


  parent reply	other threads:[~2012-09-07 17:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07 17:40 [PATCH 0/6] fuse: allocate req->pages[] dynamically Maxim Patlasov
2012-09-07 17:41 ` [PATCH 1/6] fuse: general infrastructure for pages[] of variable size Maxim Patlasov
2012-09-12 16:09   ` Miklos Szeredi
2012-09-07 17:41 ` [PATCH 2/6] fuse: categorize fuse_get_req() Maxim Patlasov
2012-09-12 16:20   ` Miklos Szeredi
2012-09-07 17:41 ` [PATCH 3/6] fuse: rework fuse_retrieve() Maxim Patlasov
2012-09-12 16:24   ` Miklos Szeredi
2012-09-07 17:41 ` [PATCH 4/6] fuse: rework fuse_readpages() Maxim Patlasov
2012-09-12 16:42   ` Miklos Szeredi
2012-09-07 17:41 ` [PATCH 5/6] fuse: rework fuse_perform_write() Maxim Patlasov
2012-09-12 16:44   ` Miklos Szeredi
2012-09-07 17:41 ` Maxim Patlasov [this message]
2012-09-10 10:18 ` [PATCH 0/6] fuse: allocate req->pages[] dynamically Maxim V. Patlasov
2012-09-12 16:07 ` Maxim V. Patlasov
2012-09-12 16:49   ` Miklos Szeredi
2012-09-14 13:18     ` Maxim V. Patlasov
2012-09-14 14:39       ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120907174154.1343.22158.stgit@maximpc.sw.ru \
    --to=mpatlasov@parallels.com \
    --cc=devel@openvz.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox