]> git.hungrycats.org Git - linux/commitdiff
ext4: remove the redundant folio_wait_stable()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 19 Apr 2024 02:30:05 +0000 (10:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:47 +0000 (09:49 +0200)
[ Upstream commit df0b5afc62f3368d657a8fe4a8d393ac481474c2 ]

__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 <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240419023005.2719050-1-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/inode.c

index 2ccf3b5e3a7c4dcb1b0c6a9d27a3c8a77a145730..31604907af50ef9f3d98fccb87c0bb36214c576a 100644 (file)
@@ -2887,9 +2887,6 @@ retry:
        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