Commit 593c8e9b authored by Zhang Yi's avatar Zhang Yi Committed by Yifan Qiao
Browse files

ext4: remove the redundant folio_wait_stable()

mainline inclusion
from mainline-v6.10-rc1
commit df0b5afc62f3368d657a8fe4a8d393ac481474c2
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IANSAC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=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 cc883236
("ext4: drop unnecessary journal handle in delalloc write") that
removed the retry getting page logic.

Fixes: cc883236 ("ext4: drop unnecessary journal handle in delalloc write")
Signed-off-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240419023005.2719050-1-yi.zhang@huaweicloud.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Conflicts:
	fs/ext4/inode.c
[Since in 4.19, ext4 has not adapted to folio yet, and
grab_cache_page_write_begin also has already wait for stable page. So
remove the redundant wait_for_stable_page as removing folio_wait_stable
in folio version.]
Signed-off-by: default avatarYifan Qiao <qiaoyifan4@huawei.com>
parent 334c97d1
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -3078,9 +3078,6 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
	if (!page)
		return -ENOMEM;

	/* In case writeback began while the page was unlocked */
	wait_for_stable_page(page);

#ifdef CONFIG_EXT4_FS_ENCRYPTION
	ret = ext4_block_write_begin(page, pos, len,
				     ext4_da_get_block_prep);