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

Commit e6949583 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Make sock_sendpage() use kernel_sendpage()



kernel_sendpage() does the proper default case handling for when the
socket doesn't have a native sendpage implementation.

Now, arguably this might be something that we could instead solve by
just specifying that all protocols should do it themselves at the
protocol level, but we really only care about the common protocols.
Does anybody really care about sendpage on something like Appletalk? Not
likely.

Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarJulien TINNES <julien@cr0.org>
Acked-by: default avatarTavis Ormandy <taviso@sdf.lonestar.org>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a3620f75
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -736,7 +736,7 @@ static ssize_t sock_sendpage(struct file *file, struct page *page,
	if (more)
	if (more)
		flags |= MSG_MORE;
		flags |= MSG_MORE;


	return sock->ops->sendpage(sock, page, offset, size, flags);
	return kernel_sendpage(sock, page, offset, size, flags);
}
}


static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
static ssize_t sock_splice_read(struct file *file, loff_t *ppos,