From patchwork Mon Aug 28 15:50:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13367636 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 A9CE6C71153 for ; Mon, 28 Aug 2023 07:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229839AbjH1Hvp (ORCPT ); Mon, 28 Aug 2023 03:51:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbjH1HvP (ORCPT ); Mon, 28 Aug 2023 03:51:15 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1216114; Mon, 28 Aug 2023 00:51:12 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4RZ2mp2VZcz4f4XWm; Mon, 28 Aug 2023 15:51:06 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgC3RqntUexkiIAVBw--.11528S2; Mon, 28 Aug 2023 15:51:09 +0800 (CST) From: Kemeng Shi To: viro@zeniv.linux.org.uk, brauner@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] vfs: use helpers for calling f_op->{read,write}_iter() in read_write.c Date: Mon, 28 Aug 2023 23:50:56 +0800 Message-Id: <20230828155056.4100924-1-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CM-TRANSID: gCh0CgC3RqntUexkiIAVBw--.11528S2 X-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lfo033gof0z/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org use helpers for calling f_op->{read,write}_iter() in read_write.c Signed-off-by: Kemeng Shi --- fs/read_write.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index a21ba3be7dbe..2f816f1212f4 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -425,7 +425,7 @@ ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) init_sync_kiocb(&kiocb, file); kiocb.ki_pos = pos ? *pos : 0; iov_iter_kvec(&iter, ITER_DEST, &iov, 1, iov.iov_len); - ret = file->f_op->read_iter(&kiocb, &iter); + ret = call_read_iter(file, &kiocb, &iter); if (ret > 0) { if (pos) *pos = kiocb.ki_pos; @@ -514,7 +514,7 @@ ssize_t __kernel_write_iter(struct file *file, struct iov_iter *from, loff_t *po init_sync_kiocb(&kiocb, file); kiocb.ki_pos = pos ? *pos : 0; - ret = file->f_op->write_iter(&kiocb, from); + ret = call_write_iter(file, &kiocb, from); if (ret > 0) { if (pos) *pos = kiocb.ki_pos;