diff options
| author | 2024-09-03 07:42:58 +0200 | |
|---|---|---|
| committer | 2024-09-03 07:42:58 +0200 | |
| commit | 35f4a629641b812e04fadef087da5d6af59e32d7 (patch) | |
| tree | 9cd5010ed6c0bf18cb631e60149a16ecccd9e0f3 /fs/backing-file.c | |
| parent | usb: roles: add lockdep class key to struct usb_role_switch (diff) | |
| parent | Linux 6.11-rc6 (diff) | |
| download | wireguard-linux-35f4a629641b812e04fadef087da5d6af59e32d7.tar.xz wireguard-linux-35f4a629641b812e04fadef087da5d6af59e32d7.zip | |
Merge 6.11-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/backing-file.c')
| -rw-r--r-- | fs/backing-file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/backing-file.c b/fs/backing-file.c index afb557446c27..8860dac58c37 100644 --- a/fs/backing-file.c +++ b/fs/backing-file.c @@ -303,13 +303,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); |
