gfs2: increase usage of folio_next_index() helper
authorMinjie Du <duminjie@vivo.com>
Mon, 17 Jul 2023 07:19:37 +0000 (15:19 +0800)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Sep 2023 13:58:15 +0000 (15:58 +0200)
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>
fs/gfs2/aops.c

index ae49256..5f02542 100644 (file)
@@ -272,8 +272,7 @@ continue_unlock:
                                 * not be suitable for data integrity
                                 * writeout).
                                 */
-                               *done_index = folio->index +
-                                       folio_nr_pages(folio);
+                               *done_index = folio_next_index(folio);
                                ret = 1;
                                break;
                        }