2023-07-17 07:48:40

by Minjie Du

[permalink] [raw]
Subject: [PATCH v1] f2fs: increase usage of folio_next_index() helper

Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
the existing helper folio_next_index().

Signed-off-by: Minjie Du <[email protected]>
---
fs/f2fs/data.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 5882afe71..298024b07 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3236,8 +3236,7 @@ static int f2fs_write_cache_pages(struct address_space *mapping,
}
goto next;
}
- done_index = folio->index +
- folio_nr_pages(folio);
+ done_index = folio_next_index(folio);
done = 1;
break;
}
--
2.39.0



2023-07-17 15:29:40

by Chao Yu

[permalink] [raw]
Subject: Re: [PATCH v1] f2fs: increase usage of folio_next_index() helper

On 2023/7/17 15:11, Minjie Du wrote:
> Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
> the existing helper folio_next_index().
>
> Signed-off-by: Minjie Du <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,

2023-08-14 22:49:15

by patchwork-bot+f2fs

[permalink] [raw]
Subject: Re: [f2fs-dev] [PATCH v1] f2fs: increase usage of folio_next_index() helper

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

On Mon, 17 Jul 2023 15:11:09 +0800 you wrote:
> Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
> the existing helper folio_next_index().
>
> Signed-off-by: Minjie Du <[email protected]>
> ---
> fs/f2fs/data.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- [f2fs-dev,v1] f2fs: increase usage of folio_next_index() helper
https://git.kernel.org/jaegeuk/f2fs/c/a842a90926b6

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html