Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp371115lqt; Thu, 18 Apr 2024 19:39:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXShZPVzQi8UrAI6VtkZ11JFG5NlLRspbqGvIfPhmA2R7bbGdeddvGK59+X9i/5SCHx9c2H30ppkMjmZ/rjYBABNtLHW1JrrPGLPF15cQ== X-Google-Smtp-Source: AGHT+IGPQqnMo9BMuCEn8i8DRcz9H970TepQMuSRpT54kB/V5/RMRXq2plZzRz4VtWLNxIz5kg/0 X-Received: by 2002:a17:90a:39cd:b0:2a6:217b:4492 with SMTP id k13-20020a17090a39cd00b002a6217b4492mr1341339pjf.3.1713494358039; Thu, 18 Apr 2024 19:39:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713494358; cv=pass; d=google.com; s=arc-20160816; b=zkKmVfEWCulsIocWvLVXa/4sen0CEgFSqpjxP5vuwDcdsb89YOzO6vffaMXYqsPhU9 Ejj41L57fMXALiNHSjQ9ZDS/yEdr+C7QGV6wCaZYuX0ZoT+9MKOWqJYM6ebRLBPYI8L9 WvFjO1u3lworxXdV384J1j4OdEvWrQTReNktRnmS7E7Ji+AtCnqZtULywn6bXn3aDyrJ UK1n9h5/N6Z5JJQ3VM4BId99xtA1wFuJ1v4vupes1/EVc/K96/GUYymzPdEZM9aU6pHd ZXkDsuQLMc9khfoZbjhgz/jjch7U5j8iag+99bKIlP4R1bc+nhVObPTSvGVVrOtHZ5lC UXEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=QJq+G8i5T5L29ZlYR4XjN/RfC9UkFGXMIy31kmLx4hg=; fh=dC1DNofMpo0fGa+HNNOiDPPA5M30OdZqJ1HdUJkde1U=; b=r70LDjAvXMpouaFvRDqY+9RXeArUtznROVZ6c3WnGeh4uMfXGnTE+/Ktdh5iT5xn3f COZU3wd0jtksxq9BDzlIyBr/tiqF4+Jfs0b2SXpmZ69HHUOqSyWywOTrhQ1r/MufqiMr vx/mlZ5ZjZIVN8EjTyu8B3x6ByAtjlijg3Eo1DlNU8p8yzPZ/UU86Q6FZogS8POGKKNN qkRzafkxjyiRSJdpdJRtMVLO0qi1FrLQ8V0TwqmtPKxBNmprGESiAxjdnX8abwhwpWsc Hqh+bX+8EIAlYssYfzsYkV2LymmSz1Q9smKDlRlfS2nzKxRTPRzPhhSr2whrskV2A9vW GuLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2148-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2148-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p15-20020a637f4f000000b005f7fe37f9a3si463858pgn.642.2024.04.18.19.39.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 19:39:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2148-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2148-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2148-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 71B81283A67 for ; Fri, 19 Apr 2024 02:39:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92F1153A1; Fri, 19 Apr 2024 02:39:12 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC529372; Fri, 19 Apr 2024 02:39:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713494352; cv=none; b=JJO2B7yYMxsrjZf5lerMOKjcz9lS3t04P4rtADZ3heZADRcdnd5k3iqVlu4f75IkOdbUX94nAVyUSGXoUI4eYeSe5lX2jrU64uly3pk4o2tIIWyBxX9SJvtA1+ZDjLwaLsJQAne+6Lrje8wVYnCcKdc7dkZlMQfLZ4TnS8sQh6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713494352; c=relaxed/simple; bh=9dEafjMPmsvuMRFpGECnHFXu2SS68ra4H3QM8YdyOuo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=AfK7OdYxE56xop2GduSZoU97qg6jFseGJ2ztjJMQKgqWRFZW4ZoM8jNSy9WCWnZ/xuR1Z6EzDbYerqyji21A3q5zVDSrtZfqrmCqGLWQ0kEPLdB/8Khk9Sj7myJuW07isObLqs6Q/7hzM4if+OQq3OtRNS9ffkntnX/iu65x2/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VLJk730plz4f3jqr; Fri, 19 Apr 2024 10:38:55 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 1E6511A0572; Fri, 19 Apr 2024 10:39:00 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgBHGBFB2SFmC8VxKQ--.51816S4; Fri, 19 Apr 2024 10:38:59 +0800 (CST) From: Zhang Yi To: linux-ext4@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: [PATCH] ext4: remove the redundant folio_wait_stable() Date: Fri, 19 Apr 2024 10:30:05 +0800 Message-Id: <20240419023005.2719050-1-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgBHGBFB2SFmC8VxKQ--.51816S4 X-Coremail-Antispam: 1UD129KBjvdXoW7JFyUKF13GrWkWr17Cr1kAFb_yoWDtwcEg3 y8Xa1rXa4fXrn3Ars3AF15Zrna9F1kWw17uF4FyFySvFy5Jas5CwnYyrn8CrWxWr4Y9rs8 Zr47XrWS9rykXjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbwkFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_GcCE 3s1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s 1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0 cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8Jw ACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij64vIr41l 4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67 AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8I cVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI 8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAF wI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7VU1a9aPUUUUU== X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ From: Zhang Yi __filemap_get_folio() with FGP_WRITEBEGIN parameter has already wait for stable folio, so remove the redundant folio_wait_stable() in ext4_da_write_begin(), it was left over from the commit cc883236b792 ("ext4: drop unnecessary journal handle in delalloc write") that removed the retry getting page logic. Fixes: cc883236b792 ("ext4: drop unnecessary journal handle in delalloc write") Signed-off-by: Zhang Yi --- fs/ext4/inode.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 537803250ca9..6de6bf57699b 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2887,9 +2887,6 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping, if (IS_ERR(folio)) return PTR_ERR(folio); - /* In case writeback began while the folio was unlocked */ - folio_wait_stable(folio); - #ifdef CONFIG_FS_ENCRYPTION ret = ext4_block_write_begin(folio, pos, len, ext4_da_get_block_prep); #else -- 2.39.2