cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH v1] gfs2: increase usage of folio_next_index() helper
@ 2023-07-17  7:19 Minjie Du
  2023-07-17  7:42 ` Andreas Gruenbacher
  0 siblings, 1 reply; 3+ messages in thread
From: Minjie Du @ 2023-07-17  7:19 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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/gfs2/aops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index ae49256b7..5f0254237 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -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;
 			}
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-17  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17  7:19 [Cluster-devel] [PATCH v1] gfs2: increase usage of folio_next_index() helper Minjie Du
2023-07-17  7:42 ` Andreas Gruenbacher
2023-07-17  7:48   ` [Cluster-devel] 回复: " 杜敏杰

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).