All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 5/5] ext4: Convert ac_buddy_page to ac_buddy_folio
Date: Tue, 16 Apr 2024 18:28:58 +0100	[thread overview]
Message-ID: <20240416172900.244637-6-willy@infradead.org> (raw)
In-Reply-To: <20240416172900.244637-1-willy@infradead.org>

This just carries around the bd_buddy_folio so should also be a folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ext4/mballoc.c | 8 ++++----
 fs/ext4/mballoc.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b2ea016f259d..e63f7365ede3 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2155,8 +2155,8 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
 	 */
 	ac->ac_bitmap_folio = e4b->bd_bitmap_folio;
 	folio_get(ac->ac_bitmap_folio);
-	ac->ac_buddy_page = &e4b->bd_buddy_folio->page;
-	get_page(ac->ac_buddy_page);
+	ac->ac_buddy_folio = e4b->bd_buddy_folio;
+	folio_get(ac->ac_buddy_folio);
 	/* store last allocated for subsequent stream allocation */
 	if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
 		spin_lock(&sbi->s_md_lock);
@@ -5995,8 +5995,8 @@ static void ext4_mb_release_context(struct ext4_allocation_context *ac)
 	}
 	if (ac->ac_bitmap_folio)
 		folio_put(ac->ac_bitmap_folio);
-	if (ac->ac_buddy_page)
-		put_page(ac->ac_buddy_page);
+	if (ac->ac_buddy_folio)
+		folio_put(ac->ac_buddy_folio);
 	if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC)
 		mutex_unlock(&ac->ac_lg->lg_mutex);
 	ext4_mb_collect_stats(ac);
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h
index ec1348fe1c04..728b2d77b03f 100644
--- a/fs/ext4/mballoc.h
+++ b/fs/ext4/mballoc.h
@@ -205,7 +205,7 @@ struct ext4_allocation_context {
 				 * N > 0, the field stores N, otherwise 0 */
 	__u8 ac_op;		/* operation, for history only */
 	struct folio *ac_bitmap_folio;
-	struct page *ac_buddy_page;
+	struct folio *ac_buddy_folio;
 	struct ext4_prealloc_space *ac_pa;
 	struct ext4_locality_group *ac_lg;
 };
-- 
2.43.0


  parent reply	other threads:[~2024-04-16 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 17:28 [PATCH 0/5] Convert ext4's mballoc to use folios Matthew Wilcox (Oracle)
2024-04-16 17:28 ` [PATCH 1/5] ext4: Convert bd_bitmap_page to bd_bitmap_folio Matthew Wilcox (Oracle)
2024-04-16 17:28 ` [PATCH 2/5] ext4: Convert bd_buddy_page to bd_buddy_folio Matthew Wilcox (Oracle)
2024-04-16 17:28 ` [PATCH 3/5] ext4: Convert ext4_mb_init_cache() to take a folio Matthew Wilcox (Oracle)
2024-04-16 17:28 ` [PATCH 4/5] ext4: Convert ac_bitmap_page to ac_bitmap_folio Matthew Wilcox (Oracle)
2024-04-16 17:28 ` Matthew Wilcox (Oracle) [this message]
2024-05-07 23:03 ` [PATCH 0/5] Convert ext4's mballoc to use folios Theodore Ts'o
2024-05-08 15:20   ` Matthew Wilcox
2024-05-09  4:26     ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240416172900.244637-6-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.