Message ID | 20230522135018.2742245-14-dhowells@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4ED2DC7EE2D for <linux-mm@archiver.kernel.org>; Mon, 22 May 2023 13:51:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8EE70280009; Mon, 22 May 2023 09:51:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89DAF280002; Mon, 22 May 2023 09:51:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 715DC280009; Mon, 22 May 2023 09:51:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 641EC280002 for <linux-mm@kvack.org>; Mon, 22 May 2023 09:51:23 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 31DC44020D for <linux-mm@kvack.org>; Mon, 22 May 2023 13:51:23 +0000 (UTC) X-FDA: 80818028046.05.CE0C1B8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf11.hostedemail.com (Postfix) with ESMTP id 84E1F4001A for <linux-mm@kvack.org>; Mon, 22 May 2023 13:51:21 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Z9iXDITk; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684763481; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gRzUovfXnw170GzVg3YWYDNx7Fcy6r2PjCbmCvJAFKQ=; b=xhJQuYhJjVtclquM6MQ6SrF4zMikpvkS+Hq0ft8LX1YxiJVxhxtbOXr+4wWhpMg2Hb1eYW y1/a9N4QhwMQdvtDTan8xUluvBe49iYV0ZYpwmXx8vpTVfFhrOsnsKunE2qI5sIKmf5I3y 3/Xl3n0f512WiFV8wDRPwlEZ6ZpyWxk= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Z9iXDITk; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684763481; a=rsa-sha256; cv=none; b=mJGIEQLa8EGj4NIIw4UHGekm47LM8m/HTHD/+5e//VDqBSXq8XoW6ZubgSjAwN87LmEPoH tKUGz0+F17F2ydfomM1OQ8+xmoT/kdFrUrtJUIhnA1y8V65yyFUxLp5naheeqx9TZiOvv1 ViIdVjiUBks2yGfJDSApoyqNma19erA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684763480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gRzUovfXnw170GzVg3YWYDNx7Fcy6r2PjCbmCvJAFKQ=; b=Z9iXDITkYU/C1FILxSc+4ZK8hHZQVWo3TkLMYqgVj6HF/25R9wk6kX/pkz1EHvF1YojqQF TqB544kq0tYE/GEiTPJijVJvHJMhuy9HkbJmJeJ2SSQGPe7GuEhBkZgTbD8SeIFE/TYmn8 cfJot1z0znj/YQU+Lplk5KxBuWhmcJI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-301-_owDkNb6PgOmvE0Khp3Vtg-1; Mon, 22 May 2023 09:51:17 -0400 X-MC-Unique: _owDkNb6PgOmvE0Khp3Vtg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8A99E8007D9; Mon, 22 May 2023 13:51:16 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88FCC40CFD45; Mon, 22 May 2023 13:51:13 +0000 (UTC) From: David Howells <dhowells@redhat.com> To: Jens Axboe <axboe@kernel.dk>, Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@infradead.org> Cc: David Howells <dhowells@redhat.com>, Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>, Jeff Layton <jlayton@kernel.org>, David Hildenbrand <david@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>, Logan Gunthorpe <logang@deltatee.com>, Hillf Danton <hdanton@sina.com>, Christian Brauner <brauner@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Christoph Hellwig <hch@lst.de>, netdev@vger.kernel.org Subject: [PATCH v22 13/31] net: Make sock_splice_read() use copy_splice_read() by default Date: Mon, 22 May 2023 14:50:00 +0100 Message-Id: <20230522135018.2742245-14-dhowells@redhat.com> In-Reply-To: <20230522135018.2742245-1-dhowells@redhat.com> References: <20230522135018.2742245-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Rspam-User: X-Stat-Signature: yaogbjaxoqwdeerrty34t18gk9c8dsum X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 84E1F4001A X-HE-Tag: 1684763481-789751 X-HE-Meta: U2FsdGVkX1+/J/SvifYr9+BnTFEqk/HQWE0XLmUG5qCQmDkS2hhInSf93ZTaJtxKR4exQHVsmVQqRInVorFkV4nFIk5Du/TPRXMgyOCEtG46T7qK8y49I4IKzk5g2o5DLMiUAjZ7Vb3oAvToIz4LA+5hf9CWbpXCWSqk4rwN6+rf5ufdZLS8PyPUlcD6qhMw5qHEK/oDwLwEO3nBUva8+0C6Tnf/iy2aub2efwAQPjUQC8O5shl/d7yT/DHSSxbCQzkZDfGSFXZc6FOKLSn+eiQZVpHFP3O8Zx+uhl1AGxK0fxMPKVdxBk6FVJx05FxMheQaaSEWf6A9mVvMT9D0nT8gwxVEFvEsOV44/HkfNH2ARPDdo9lj7vB7F6TDOQ7nWDH/ts7znK1GMKLuCo0KdTN+RdYhfLreDG2ixmonvT2ZgsMwS5P2NvVk8kG9UyaMCnX7PzJOsSA0+Eaot+4IaQ8j6yptOjSFb4GkLPa6Is+O/oHOr1FY9y/DYgg+4ShJqm5h1aC36neK63HFX9ghvipDRPwpGMh3aU/GEBZIKipVmRgud4Dx5Khms2nFfvVI4NjjLqBkfcggQGaMxUdC4C0gHJBYLbq/6zG/XNxDEBNAIYvXUwe1frRPsXb09NzAJQgqNk9oEV8HAlcChm94pujYWSfYRVIWsHtrdNoDpFrbikC8X/0R6xRcGelvO8UJ5wX/VC2NVPAMXCRGJAqssbKlyRfjQqZKDKf1qS/GMtX0gJHd6SI7GMMYhx/TIohc0kMUQmE8KfoB0L3c23qqSozxw+xzNdQk/FQHDtxqOTc4oqDSK7Htqups7H5npG2vtey7Mog8/MMiAZ4biTrK8BWWD1Sm7gfoEtlEMUlVurZQ550jJ2vg4vtZsA2BfIp6O5RzHixe1FCLf14Bm1Y7n2meLvEb0QyGtLk6TJp/PEZ8hzkHZ7MbsfjMBbD9Eyz28sOso14KPywJr4NaMgp nYkSxkAM WEe+hY8guBIi7pnWGT9TaQ8k6GRr7B0JxFMKk1rBBSGkDQbKGwzKEGrX8iGOscpTPXCkJ6PXvpwylgTDXP3ZrMH/ZV4VfziemKj9t54VWVlL61m5owrGHhBktAlv+1YuXepNI5CnAIPSbYCRr4y+4LeGw4xwnnm2JVd5Yo5sHGxp6A/MHqHfNGuTmFMbvx6mzMsvTiBMtZ5dazDCBqusrTq7C0Ny+QFbFXOVwHpbB/ZSeSmk+e+QZxvXkj3aahL3TLs4emarA0V0DSIOGCwXhYCUsDbfeH0B1ghKfVB67XsnkSW/EsUB5mYwfvl8BMd2X9ObRYd+Ovb8vtr9RNLiDo36RAewNF125ZJO85bs3gkV95LcdB2pNEDA50kmXTE2/E62BuNUU4E+THPpnqfBx4VVfoIbeo9uHa0X7jykmKjQ0dutM/VnBhTge/PACn/BESylW6la8TcRhTaj11WA2ggq4sa0iN+Djmprp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
splice: Kill ITER_PIPE
|
expand
|
diff --git a/net/socket.c b/net/socket.c index b7e01d0fe082..401778380195 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1093,7 +1093,7 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos, struct socket *sock = file->private_data; if (unlikely(!sock->ops->splice_read)) - return generic_file_splice_read(file, ppos, pipe, len, flags); + return copy_splice_read(file, ppos, pipe, len, flags); return sock->ops->splice_read(sock, ppos, pipe, len, flags); }
Make sock_splice_read() use copy_splice_read() by default as file_splice_read() will return immediately with 0 as a socket has no pagecache and is a zero-size file. Signed-off-by: David Howells <dhowells@redhat.com> cc: "David S. Miller" <davem@davemloft.net> cc: Eric Dumazet <edumazet@google.com> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: Christoph Hellwig <hch@lst.de> cc: Al Viro <viro@zeniv.linux.org.uk> cc: Jens Axboe <axboe@kernel.dk> cc: netdev@vger.kernel.org cc: linux-block@vger.kernel.org cc: linux-mm@kvack.org --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)