* [PATCH] ext4: remove the redundant folio_wait_stable()
@ 2024-04-19 2:30 Zhang Yi
2024-04-19 9:28 ` Jan Kara
2024-05-07 23:03 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Zhang Yi @ 2024-04-19 2:30 UTC (permalink / raw)
To: linux-ext4
Cc: linux-fsdevel, tytso, adilger.kernel, jack, yi.zhang, yi.zhang,
chengzhihao1, yukuai3
From: Zhang Yi <yi.zhang@huawei.com>
__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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: remove the redundant folio_wait_stable()
2024-04-19 2:30 [PATCH] ext4: remove the redundant folio_wait_stable() Zhang Yi
@ 2024-04-19 9:28 ` Jan Kara
2024-05-07 23:03 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2024-04-19 9:28 UTC (permalink / raw)
To: Zhang Yi
Cc: linux-ext4, linux-fsdevel, tytso, adilger.kernel, jack, yi.zhang,
chengzhihao1, yukuai3
On Fri 19-04-24 10:30:05, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
>
> __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>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> 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
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: remove the redundant folio_wait_stable()
2024-04-19 2:30 [PATCH] ext4: remove the redundant folio_wait_stable() Zhang Yi
2024-04-19 9:28 ` Jan Kara
@ 2024-05-07 23:03 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2024-05-07 23:03 UTC (permalink / raw)
To: linux-ext4, Zhang Yi
Cc: Theodore Ts'o, linux-fsdevel, adilger.kernel, jack, yi.zhang,
chengzhihao1, yukuai3
On Fri, 19 Apr 2024 10:30:05 +0800, Zhang Yi wrote:
> __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.
>
>
> [...]
Applied, thanks!
[1/1] ext4: remove the redundant folio_wait_stable()
commit: df0b5afc62f3368d657a8fe4a8d393ac481474c2
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-07 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19 2:30 [PATCH] ext4: remove the redundant folio_wait_stable() Zhang Yi
2024-04-19 9:28 ` Jan Kara
2024-05-07 23:03 ` Theodore Ts'o
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.