* [PATCH v1] btrfs: increase usage of folio_next_index() helper
@ 2023-07-17 7:16 Minjie Du
2023-07-17 7:29 ` Johannes Thumshirn
2023-07-19 21:54 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Minjie Du @ 2023-07-17 7:16 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba,
open list:BTRFS FILE SYSTEM, open list
Cc: opensource.kernel, Minjie Du
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/btrfs/extent_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 094004c11..d1c44e17d 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2127,7 +2127,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
for (i = 0; i < nr_folios; i++) {
struct folio *folio = fbatch.folios[i];
- done_index = folio->index + folio_nr_pages(folio);
+ done_index = folio_next_index(folio);
/*
* At this point we hold neither the i_pages lock nor
* the page lock: the page may be truncated or
--
2.39.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] btrfs: increase usage of folio_next_index() helper
2023-07-17 7:16 [PATCH v1] btrfs: increase usage of folio_next_index() helper Minjie Du
@ 2023-07-17 7:29 ` Johannes Thumshirn
2023-07-19 21:54 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2023-07-17 7:29 UTC (permalink / raw)
To: Minjie Du, Chris Mason, Josef Bacik, David Sterba,
open list:BTRFS FILE SYSTEM, open list
Cc: opensource.kernel
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] btrfs: increase usage of folio_next_index() helper
2023-07-17 7:16 [PATCH v1] btrfs: increase usage of folio_next_index() helper Minjie Du
2023-07-17 7:29 ` Johannes Thumshirn
@ 2023-07-19 21:54 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2023-07-19 21:54 UTC (permalink / raw)
To: Minjie Du
Cc: Chris Mason, Josef Bacik, David Sterba,
open list:BTRFS FILE SYSTEM, open list, opensource.kernel
On Mon, Jul 17, 2023 at 03:16:22PM +0800, 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>
With a slightly modified subject added to misc-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-19 22:00 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:16 [PATCH v1] btrfs: increase usage of folio_next_index() helper Minjie Du
2023-07-17 7:29 ` Johannes Thumshirn
2023-07-19 21:54 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®