linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Jeff Layton <jlayton@poochiereds.net>,
	linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 10/10] nfsd: remove nfsd_vfs_read
Date: Tue, 30 May 2017 14:03:21 -0400	[thread overview]
Message-ID: <20170530180321.GI18523@fieldses.org> (raw)
In-Reply-To: <20170527081654.15957-11-hch@lst.de>

ACK.--b.

On Sat, May 27, 2017 at 11:16:54AM +0300, Christoph Hellwig wrote:
> Simpler done in the only caller.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/nfsd/vfs.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 37a03c456b38..0d19ab1b9404 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -920,16 +920,6 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
>  	return nfsd_finish_read(file, count, host_err);
>  }
>  
> -static __be32
> -nfsd_vfs_read(struct svc_rqst *rqstp, struct file *file,
> -	      loff_t offset, struct kvec *vec, int vlen, unsigned long *count)
> -{
> -	if (file->f_op->splice_read && test_bit(RQ_SPLICE_OK, &rqstp->rq_flags))
> -		return nfsd_splice_read(rqstp, file, offset, count);
> -	else
> -		return nfsd_readv(file, offset, vec, vlen, count);
> -}
> -
>  /*
>   * Gathered writes: If another process is currently writing to the file,
>   * there's a high chance this is another nfsd (triggered by a bulk write
> @@ -1041,7 +1031,12 @@ __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
>  	ra = nfsd_init_raparms(file);
>  
>  	trace_read_opened(rqstp, fhp, offset, vlen);
> -	err = nfsd_vfs_read(rqstp, file, offset, vec, vlen, count);
> +
> +	if (file->f_op->splice_read && test_bit(RQ_SPLICE_OK, &rqstp->rq_flags))
> +		err = nfsd_splice_read(rqstp, file, offset, count);
> +	else
> +		err = nfsd_readv(file, offset, vec, vlen, count);
> +
>  	trace_read_io_done(rqstp, fhp, offset, vlen);
>  
>  	if (ra)
> -- 
> 2.11.0

  reply	other threads:[~2017-05-30 18:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-27  8:16 clean up readv/writev helpers Christoph Hellwig
2017-05-27  8:16 ` [PATCH 01/10] fs: pass on flags in compat_writev Christoph Hellwig
2017-05-27  8:16 ` [PATCH 02/10] fs: remove do_readv_writev Christoph Hellwig
2017-05-27  8:16 ` [PATCH 03/10] fs: remove do_compat_readv_writev Christoph Hellwig
2017-05-27  8:16 ` [PATCH 04/10] fs: remove __do_readv_writev Christoph Hellwig
2017-05-27  8:16 ` [PATCH 05/10] fs: move more code into do_iter_read/do_iter_write Christoph Hellwig
2017-05-27  8:16 ` [PATCH 06/10] fs: set kernel address limit in do_loop_readv_writev Christoph Hellwig
2017-05-27  8:19   ` Christoph Hellwig
2017-05-27  8:16 ` [PATCH 07/10] fs: implement vfs_iter_read using do_iter_read Christoph Hellwig
2017-05-27  8:16 ` [PATCH 08/10] fs: implement vfs_iter_write using do_iter_write Christoph Hellwig
2017-05-27  8:16 ` [PATCH 09/10] nfsd: use vfs_iter_read/write Christoph Hellwig
2017-05-30 18:02   ` J. Bruce Fields
2017-05-27  8:16 ` [PATCH 10/10] nfsd: remove nfsd_vfs_read Christoph Hellwig
2017-05-30 18:03   ` J. Bruce Fields [this message]
2017-05-27 19:32 ` clean up readv/writev helpers Al Viro
2017-06-28 14:35   ` Christoph Hellwig
2017-06-28 16:37     ` Al Viro

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=20170530180321.GI18523@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).