fuse: convert ioctl to simple api

fuse_simple_request() is converted to return length of last (instead of
single) out arg, since FUSE_IOCTL_OUT has two out args, the second of which
is variable length.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 0a6624ae..29723e1 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -590,8 +590,8 @@ ssize_t fuse_simple_request(struct fuse_conn *fc, struct fuse_args *args)
 	__fuse_request_send(fc, req);
 	ret = req->out.h.error;
 	if (!ret && args->out_argvar) {
-		BUG_ON(args->out_numargs != 1);
-		ret = req->out.args[0].size;
+		BUG_ON(args->out_numargs == 0);
+		ret = req->out.args[args->out_numargs - 1].size;
 	}
 	fuse_put_request(fc, req);