Revert "fs: check FMODE_LSEEK to control internal pipe splicing"

This reverts commit fd0a6e99b6.

Which was upstream commit 97ef77c52b.

The commit is missing dependencies and breaks NFS tests, remove it for
now.

Reported-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Sasha Levin 2022-10-15 07:18:38 -04:00 committed by Greg Kroah-Hartman
parent a51d884cc3
commit 6d43e94b8d
1 changed files with 6 additions and 4 deletions

View File

@ -899,15 +899,17 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
{ {
struct pipe_inode_info *pipe; struct pipe_inode_info *pipe;
long ret, bytes; long ret, bytes;
umode_t i_mode;
size_t len; size_t len;
int i, flags, more; int i, flags, more;
/* /*
* We require the input to be seekable, as we don't want to randomly * We require the input being a regular file, as we don't want to
* drop data for eg socket -> socket splicing. Use the piped splicing * randomly drop data for eg socket -> socket splicing. Use the
* for that! * piped splicing for that!
*/ */
if (unlikely(!(in->f_mode & FMODE_LSEEK))) i_mode = file_inode(in)->i_mode;
if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode)))
return -EINVAL; return -EINVAL;
/* /*