Return-Path: linux-nfs-owner@vger.kernel.org Received: from mail-wi0-f177.google.com ([209.85.212.177]:57967 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933032AbaLDRwO (ORCPT ); Thu, 4 Dec 2014 12:52:14 -0500 From: Pieter Smith To: linux-kernel@vger.kernel.org Cc: Josh Triplett , Pieter Smith , Alexander Duyck , Alexander Viro , Alexei Starovoitov , Andrew Morton , Bertrand Jacquin , Catalina Mocanu , Daniel Borkmann , "David S. Miller" , Eric Dumazet , "Eric W. Biederman" , Fabian Frederick , fuse-devel@lists.sourceforge.net (open list:FUSE: FILESYSTEM...), Geert Uytterhoeven , Hugh Dickins , Iulia Manda , Jan Beulich , "J. Bruce Fields" , Jeff Layton , linux-api@vger.kernel.org (open list:ABI/API), linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org (open list:KERNEL NFSD, SUNR...), "Luis R. Rodriguez" , Matt Turner , Mel Gorman , "Michael S. Tsirkin" , Miklos Szeredi , netdev@vger.kernel.org (open list:NETWORKING [GENERAL]), Oleg Nesterov , Paul Durrant , "Paul E. McKenney" , Peter Foley , Thomas Graf , Tom Herbert , Trond Myklebust , Willem de Bruijn , Xiao Guangrong , =?UTF-8?q?=E8=94=A1=E6=AD=A3=E9=BE=99?= Subject: [PATCH v6 4/7] fs/fuse: support compiling out splice Date: Thu, 4 Dec 2014 18:50:52 +0100 Message-Id: <1417715473-24110-5-git-send-email-pieter@boesman.nl> In-Reply-To: <1417715473-24110-1-git-send-email-pieter@boesman.nl> References: <1417715473-24110-1-git-send-email-pieter@boesman.nl> Sender: linux-nfs-owner@vger.kernel.org List-ID: 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 --- fs/fuse/dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index ca88731..99f1ff4 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1291,6 +1291,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 +1369,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