Skip to content

Commit

Permalink
gfs2: increase usage of folio_next_index() helper
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
  • Loading branch information
Minjie Du authored and Andreas Gruenbacher committed Sep 5, 2023
1 parent 02aee81 commit 5f02d16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/gfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ static int gfs2_write_jdata_batch(struct address_space *mapping,
* not be suitable for data integrity
* writeout).
*/
*done_index = folio->index +
folio_nr_pages(folio);
*done_index = folio_next_index(folio);
ret = 1;
break;
}
Expand Down

0 comments on commit 5f02d16

Please sign in to comment.