[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210104161716.GA68600@infradead.org>
Date: Mon, 4 Jan 2021 16:17:16 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: linux-block@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
Ming Lei <ming.lei@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Jonathan Corbet <corbet@....net>, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org, target-devel@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 1/7] splice: don't generate zero-len segement bvecs
On Sat, Jan 02, 2021 at 03:17:33PM +0000, Pavel Begunkov wrote:
> iter_file_splice_write() may spawn bvec segments with zero-length. In
> preparation for prohibiting them, filter out by hand at splice level.
>
> Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
> ---
> fs/splice.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/fs/splice.c b/fs/splice.c
> index 866d5c2367b2..7299330c3270 100644
> --- a/fs/splice.c
> +++ b/fs/splice.c
> @@ -644,7 +644,6 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
> ret = splice_from_pipe_next(pipe, &sd);
> if (ret <= 0)
> break;
> -
Spurious empty line removal..
> + if (!this_len)
> + continue;
Maybe throw in a comment on why we skip empty segments here?
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists