[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1416870079-15254-5-git-send-email-pieter@boesman.nl>
Date: Tue, 25 Nov 2014 00:01:03 +0100
From: Pieter Smith <pieter@...sman.nl>
To: pieter@...sman.nl
Cc: Josh Triplett <josh@...htriplett.org>,
Alexander Duyck <alexander.h.duyck@...el.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Alexei Starovoitov <ast@...mgrid.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Bertrand Jacquin <beber@...eeweb.net>,
Catalina Mocanu <catalina.mocanu@...il.com>,
Daniel Borkmann <dborkman@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Fabian Frederick <fabf@...net.be>,
fuse-devel@...ts.sourceforge.net (open list:FUSE: FILESYSTEM...),
Geert Uytterhoeven <geert@...ux-m68k.org>,
Hugh Dickins <hughd@...gle.com>,
Iulia Manda <iulia.manda21@...il.com>,
Jan Beulich <JBeulich@...e.com>,
"J. Bruce Fields" <bfields@...ldses.org>,
Jeff Layton <jlayton@...chiereds.net>,
linux-api@...r.kernel.org (open list:ABI/API),
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org (open list),
linux-nfs@...r.kernel.org (open list:KERNEL NFSD, SUNR...),
"Luis R. Rodriguez" <mcgrof@...e.com>,
Matt Turner <mattst88@...il.com>, Mel Gorman <mgorman@...e.de>,
"Michael S. Tsirkin" <mst@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
netdev@...r.kernel.org (open list:NETWORKING [GENERAL]),
Oleg Nesterov <oleg@...hat.com>,
Paul Durrant <Paul.Durrant@...rix.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Peter Foley <pefoley2@...oley.com>,
Thomas Graf <tgraf@...g.ch>, Tom Herbert <therbert@...gle.com>,
Trond Myklebust <trond.myklebust@...marydata.com>,
Willem de Bruijn <willemb@...gle.com>,
Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
蔡正龙 <zhenglong.cai@...c.com.cn>
Subject: [PATCH v4 4/7] fs/fuse: support compiling out splice
To implement splice support, fs/fuse makes use of nosteal_pipe_buf_ops. This
struct is exported by fs/splice. The goal of the larger patch set is to
completely compile out fs/splice, so uses of the exported struct need to be
compiled out along with fs/splice.
This patch therefore compiles out splice support in fs/fuse when
CONFIG_SYSCALL_SPLICE is undefined.
Signed-off-by: Pieter Smith <pieter@...sman.nl>
---
fs/fuse/dev.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index ca88731..e984302 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1191,8 +1191,9 @@ __releases(fc->lock)
* request_end(). Otherwise add it to the processing list, and set
* the 'sent' flag.
*/
-static ssize_t fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
- struct fuse_copy_state *cs, size_t nbytes)
+static ssize_t __maybe_unused
+fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
+ struct fuse_copy_state *cs, size_t nbytes)
{
int err;
struct fuse_req *req;
@@ -1291,6 +1292,7 @@ static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov,
return fuse_dev_do_read(fc, file, &cs, iov_length(iov, nr_segs));
}
+#ifdef CONFIG_SYSCALL_SPLICE
static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
@@ -1368,6 +1370,9 @@ out:
kfree(bufs);
return ret;
}
+#else /* CONFIG_SYSCALL_SPLICE */
+#define fuse_dev_splice_read NULL
+#endif
static int fuse_notify_poll(struct fuse_conn *fc, unsigned int size,
struct fuse_copy_state *cs)
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists