mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Pieter Smith <pieter@boesman.nl>
Cc: Josh Triplett <josh@joshtriplett.org>,
	fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/7] fs/fuse: support compiling out splice
Date: Tue, 25 Nov 2014 15:17:13 +0100	[thread overview]
Message-ID: <20141125141713.GA9137@tucsk.suse.de> (raw)
In-Reply-To: <1416899996-21315-5-git-send-email-pieter@boesman.nl>

[Trimming CC.  Please do the same for other patches.  I for one am not
interested in the general tinification discussion]

On Tue, Nov 25, 2014 at 08:19:39AM +0100, Pieter Smith wrote:
> 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@boesman.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)

fuse_dev_do_read() is definitely going to remain used.  So no point in adding
__maybe_unused.

>  {
>  	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

This looks fine.

Thanks,
Miklos

>  
>  static int fuse_notify_poll(struct fuse_conn *fc, unsigned int size,
>  			    struct fuse_copy_state *cs)
> -- 
> 2.1.0
> 

  reply	other threads:[~2014-11-25 14:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  7:19 [PATCH v5 0/7] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile) Pieter Smith
2014-11-25  7:19 ` [PATCH v5 1/7] fs: move sendfile syscall into fs/splice Pieter Smith
2014-11-25  7:19 ` [PATCH v5 2/7] fs: moved kernel_write to fs/read_write Pieter Smith
2014-11-25  7:19 ` [PATCH v5 3/7] fs/splice: support compiling out splice-family syscalls Pieter Smith
2014-11-25  7:19 ` [PATCH v5 4/7] fs/fuse: support compiling out splice Pieter Smith
2014-11-25 14:17   ` Miklos Szeredi [this message]
2014-11-25 19:42     ` Pieter Smith
2014-11-25 20:49       ` josh
2014-11-26  7:46         ` Pieter Smith
2014-11-26  7:44       ` Pieter Smith
2014-11-25  7:19 ` [PATCH v5 5/7] net/core: " Pieter Smith
2014-11-25  7:19 ` [PATCH v5 6/7] fs/nfsd: " Pieter Smith
2014-11-25  7:19 ` [PATCH v5 7/7] fs/splice: full support for " Pieter Smith

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=20141125141713.GA9137@tucsk.suse.de \
    --to=miklos@szeredi.hu \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=josh@joshtriplett.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pieter@boesman.nl \
    /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

Powered by JetHome