Skip to contentSkip to conversation

gfs2: increase usage of folio_next_index() helper

PATCH Applied Minjie Du 2 participants 3 messages Jul 17, 2023 GFS2 file system

lore
Share & tools
lore

Minjie Du

author
#0 lore raw

PATCH 1/1 gfs2: 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().

---
 fs/gfs2/aops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/gfs2/aops.c +1 -2
index ae49256b7..5f0254237 100644
@@ -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;
 			}
Signature · 1 line
2.39.0
maintainer Applied
#1 lore raw

Minjie,

Quoted 23 lines · On Mon, Jul 17, 2023 at 9:20?AM Minjie Du <[email protected]> wrote:

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

---
 fs/gfs2/aops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/gfs2/aops.c +1 -3
index ae49256b7..5f0254237 100644
@@ -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;
                        }
--
Quoted 2 lines

2.39.0

Applied, thanks.

Email addresses like '"open list:GFS2 FILE SYSTEM" <[email protected]>' and 'open list <[email protected]>' are not helpful though, so could you please avoid using addresses like that in the future?

Thanks,
Andreas

author Applied
#2 lore raw

Hi Andreas!

Quoted 1 line

Applied, thanks.

That's great, thank you!

Quoted 3 lines

Email addresses like '"open list:GFS2 FILE SYSTEM" <[email protected]>' and 'open list <[email protected]>' are not helpful though, so could you please avoid using addresses like that in the future?

I see, thanks for reminding!

regards,
Minjie
-----????-----
???: Andreas Gruenbacher <[email protected]>
????: 2023?7?17? 15:42
???: ??? <[email protected]>
??: Bob Peterson <[email protected]>; cluster-devel at redhat.com; linux-kernel at vger.kernel.org; opensource.kernel <[email protected]> ??: Re: [PATCH v1] gfs2: increase usage of folio_next_index() helper

Minjie,

Quoted 23 lines · On Mon, Jul 17, 2023 at 9:20?AM Minjie Du <[email protected]> wrote:

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

---
 fs/gfs2/aops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/gfs2/aops.c index renamed from fs/gfs2/aops.c +0 -0

ae49256b7..5f0254237 100644

fs/gfs2/aops.c +1 -3
@@ -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;
                        }
--
Quoted 2 lines

2.39.0

Applied, thanks.

Email addresses like '"open list:GFS2 FILE SYSTEM"
<[email protected]>' and 'open list <[email protected]>' are not helpful though, so could you please avoid using addresses like that in the future?

Thanks,
Andreas