From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E716DC2D0A3 for ; Thu, 29 Oct 2020 10:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B2DA20825 for ; Thu, 29 Oct 2020 10:16:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AgDpgKJw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726472AbgJ2KQ3 (ORCPT ); Thu, 29 Oct 2020 06:16:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbgJ2KQ3 (ORCPT ); Thu, 29 Oct 2020 06:16:29 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EF5FC0613D2; Thu, 29 Oct 2020 03:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=djfj5Ib6kVbLvDyqsMvYxF4Q43ZPZBiaaNCRhHm946I=; b=AgDpgKJwWTyUWQK15eoU1FISLY gdkzXBMNTiwBjujM2z9iX3mDGMMkpNtM5ox1plCtkheKCetPSVw4z7XVw9PlrFJI5EEdCysO3ojjI RJl2wz3/v5hZMR+h9O+P3t9F+CWSeUiXwvHVR6mbK7fxJkzCDvbHzu2tJggt6qq4iCtAr++bctgu8 bXaSmokW8BKYPgSYV3sYxS9LKfiBGtpDj+2TfSkfwwF+KUkEOGIoP12d86gtLbbtPHOVdm9doRKXS dq4xhiHp1VUluVxg0EJ1bkJQ+hSG5LaQOubSn383nFG3DoK9DVjnBiMVe5Oxp31h5ixwMgo9BCgCn Os10omtg==; Received: from 089144193201.atnat0002.highway.a1.net ([89.144.193.201] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY4yo-00043u-A8; Thu, 29 Oct 2020 10:16:26 +0000 From: Christoph Hellwig To: Al Viro Cc: Greg KH , Linus Torvalds , Alexey Dobriyan , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] proc: wire up generic_file_splice_read for iter ops Date: Thu, 29 Oct 2020 11:09:49 +0100 Message-Id: <20201029100950.46668-3-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201029100950.46668-1-hch@lst.de> References: <20201029100950.46668-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wire up generic_file_splice_read for the iter based proxy ops, so that splice reads from them work. Signed-off-by: Christoph Hellwig --- fs/proc/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 58c075e2a452d6..bde6b6f69852d2 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -597,6 +597,7 @@ static const struct file_operations proc_iter_file_ops = { .llseek = proc_reg_llseek, .read_iter = proc_reg_read_iter, .write = proc_reg_write, + .splice_read = generic_file_splice_read, .poll = proc_reg_poll, .unlocked_ioctl = proc_reg_unlocked_ioctl, .mmap = proc_reg_mmap, @@ -622,6 +623,7 @@ static const struct file_operations proc_reg_file_ops_compat = { static const struct file_operations proc_iter_file_ops_compat = { .llseek = proc_reg_llseek, .read_iter = proc_reg_read_iter, + .splice_read = generic_file_splice_read, .write = proc_reg_write, .poll = proc_reg_poll, .unlocked_ioctl = proc_reg_unlocked_ioctl, -- 2.28.0