Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c248c333 authored by Sasha Levin's avatar Sasha Levin Committed by Greg Kroah-Hartman
Browse files

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



This reverts commit fd0a6e99b61e6c08fa5cf585d54fd956f70c73a6.

Which was upstream commit 97ef77c52b789ec1411d360ed99dca1efe4b2c81.

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

Reported-by: default avatarSaeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1d0da867
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -895,15 +895,17 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
{
	struct pipe_inode_info *pipe;
	long ret, bytes;
	umode_t i_mode;
	size_t len;
	int i, flags, more;

	/*
	 * We require the input to be seekable, as we don't want to randomly
	 * drop data for eg socket -> socket splicing. Use the piped splicing
	 * for that!
	 * We require the input being a regular file, as we don't want to
	 * randomly drop data for eg socket -> socket splicing. Use the
	 * 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;

	/*