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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C533BEB64DD for ; Sun, 9 Jul 2023 11:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbjGILRn (ORCPT ); Sun, 9 Jul 2023 07:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjGILRm (ORCPT ); Sun, 9 Jul 2023 07:17:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 194DAB5 for ; Sun, 9 Jul 2023 04:17:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7817560BD6 for ; Sun, 9 Jul 2023 11:17:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86E99C433C7; Sun, 9 Jul 2023 11:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1688901460; bh=KZ7RuHaDKiw3jNs0CqzzEe1CkI0ZPfkzm5rN2NbjkpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xasw+nTJAkc3Qu7Nwzdv50NXLNPAF0msyRPStYEbQlCeMTmCgzUYj1pxyq6tTYZkz 5zwNsvymLe2s7M5LwPu5vChlu2dVKbEOCudEseHjwqLwW528rYQZrKpOK7xPW9z9Cf +ql3Wzly+FCNO6EAMfiTzRW4Fdm48pHETP92u1Wo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , Johannes Thumshirn , Christian Brauner , David Howells , Jens Axboe , Sasha Levin Subject: [PATCH 6.3 028/431] splice: dont call file_accessed in copy_splice_read Date: Sun, 9 Jul 2023 13:09:36 +0200 Message-ID: <20230709111451.759851249@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230709111451.101012554@linuxfoundation.org> References: <20230709111451.101012554@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christoph Hellwig [ Upstream commit 0b24be4691c9e6ea13ca70050d42a9f9032fa788 ] copy_splice_read calls into ->read_iter to read the data, which already calls file_accessed. Fixes: 33b3b041543e ("splice: Add a func to do a splice from an O_DIRECT file without ITER_PIPE") Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Christian Brauner Reviewed-by: David Howells Link: https://lore.kernel.org/r/20230614140341.521331-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- fs/splice.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/splice.c b/fs/splice.c index 2c3dec2b6dfaf..5eca589fe8479 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -338,7 +338,6 @@ ssize_t direct_splice_read(struct file *in, loff_t *ppos, reclaim -= ret; remain = ret; *ppos = kiocb.ki_pos; - file_accessed(in); } else if (ret < 0) { /* * callers of ->splice_read() expect -EAGAIN on -- 2.39.2