Explorar o código

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 <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Maxim Patlasov %!s(int64=13) %!d(string=hai) anos
pai
achega
54b966702d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fs/fuse/file.c

+ 1 - 1
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;