mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ed Tsai (蔡宗軒)" <Ed.Tsai@mediatek.com>
To: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"miklos@szeredi.hu" <miklos@szeredi.hu>,
	"amir73il@gmail.com" <amir73il@gmail.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"jack@suse.cz" <jack@suse.cz>,
	"brauner@kernel.org" <brauner@kernel.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	wsd_upstream <wsd_upstream@mediatek.com>,
	"Casper Li (李中榮)" <casper.li@mediatek.com>,
	"Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/1] backing-file: covert to using fops->splice_write
Date: Fri, 5 Jul 2024 08:20:17 +0000	[thread overview]
Message-ID: <0a104644108c624457e4311facf0a2a3c109f718.camel@mediatek.com> (raw)
In-Reply-To: <20240705081642.12032-1-ed.tsai@mediatek.com>

On Fri, 2024-07-05 at 16:16 +0800, ed.tsai@mediatek.com wrote:
> From: Ed Tsai <ed.tsai@mediatek.com>
> 
> Filesystems may define their own splice write. Therefore, use file
> fops instead of invoking iter_file_splice_write() directly.
> 
> Signed-off-by: Ed Tsai <ed.tsai@mediatek.com>
> ---
>  fs/backing-file.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/backing-file.c b/fs/backing-file.c
> index 740185198db3..687a7fae7d25 100644
> --- a/fs/backing-file.c
> +++ b/fs/backing-file.c
> @@ -280,13 +280,16 @@ ssize_t backing_file_splice_write(struct
> pipe_inode_info *pipe,
>  	if (WARN_ON_ONCE(!(out->f_mode & FMODE_BACKING)))
>  		return -EIO;
>  
> +	if (out->f_op->splice_write)
> +		return -EINVAL;
> +
>  	ret = file_remove_privs(ctx->user_file);
>  	if (ret)
>  		return ret;
>  
>  	old_cred = override_creds(ctx->cred);
>  	file_start_write(out);
> -	ret = iter_file_splice_write(pipe, out, ppos, len, flags);
> +	ret = out->f_op->splice_write(pipe, out, ppos, len, flags);
>  	file_end_write(out);
>  	revert_creds(old_cred);
>  

s/covert/convert/ for subject

  reply	other threads:[~2024-07-05  8:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05  8:16 ed.tsai
2024-07-05  8:20 ` Ed Tsai (蔡宗軒) [this message]
2024-07-05 12:27 ` Amir Goldstein
2024-07-07 20:42 ` Matthew Wilcox
2024-07-07 23:52   ` Ed Tsai (蔡宗軒)

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=0a104644108c624457e4311facf0a2a3c109f718.camel@mediatek.com \
    --to=ed.tsai@mediatek.com \
    --cc=Chun-hung.Wu@mediatek.com \
    --cc=amir73il@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=brauner@kernel.org \
    --cc=casper.li@mediatek.com \
    --cc=jack@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=miklos@szeredi.hu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wsd_upstream@mediatek.com \
    /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

all inboxes | Powered by JetHome®