diff mbox series

[f2fs-dev,v1] f2fs: increase usage of folio_next_index() helper

Message ID 20230717071109.5663-1-duminjie@vivo.com (mailing list archive)
State Accepted
Commit a842a90926b6b96ef38d6a190c27a4a60531a633
Headers show
Series [f2fs-dev,v1] f2fs: increase usage of folio_next_index() helper | expand

Commit Message

Minjie Du July 17, 2023, 7:11 a.m. UTC
Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
the existing helper folio_next_index().

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 fs/f2fs/data.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chao Yu July 17, 2023, 3:20 p.m. UTC | #1
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 <duminjie@vivo.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,
patchwork-bot+f2fs@kernel.org Aug. 14, 2023, 8:50 p.m. UTC | #2
Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

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 <duminjie@vivo.com>
> ---
>  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!
diff mbox series

Patch

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;
 			}