Skip to content

Commit c84f151

Browse files
Matthew Wilcox (Oracle)tytso
authored andcommitted
ext4: convert ac_buddy_page to ac_buddy_folio
This just carries around the bd_buddy_folio so should also be a folio. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20240416172900.244637-6-willy@infradead.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent ccedf35 commit c84f151

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fs/ext4/mballoc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,8 +2163,8 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
21632163
*/
21642164
ac->ac_bitmap_folio = e4b->bd_bitmap_folio;
21652165
folio_get(ac->ac_bitmap_folio);
2166-
ac->ac_buddy_page = &e4b->bd_buddy_folio->page;
2167-
get_page(ac->ac_buddy_page);
2166+
ac->ac_buddy_folio = e4b->bd_buddy_folio;
2167+
folio_get(ac->ac_buddy_folio);
21682168
/* store last allocated for subsequent stream allocation */
21692169
if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
21702170
spin_lock(&sbi->s_md_lock);
@@ -6004,8 +6004,8 @@ static void ext4_mb_release_context(struct ext4_allocation_context *ac)
60046004
}
60056005
if (ac->ac_bitmap_folio)
60066006
folio_put(ac->ac_bitmap_folio);
6007-
if (ac->ac_buddy_page)
6008-
put_page(ac->ac_buddy_page);
6007+
if (ac->ac_buddy_folio)
6008+
folio_put(ac->ac_buddy_folio);
60096009
if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC)
60106010
mutex_unlock(&ac->ac_lg->lg_mutex);
60116011
ext4_mb_collect_stats(ac);

fs/ext4/mballoc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ struct ext4_allocation_context {
205205
* N > 0, the field stores N, otherwise 0 */
206206
__u8 ac_op; /* operation, for history only */
207207
struct folio *ac_bitmap_folio;
208-
struct page *ac_buddy_page;
208+
struct folio *ac_buddy_folio;
209209
struct ext4_prealloc_space *ac_pa;
210210
struct ext4_locality_group *ac_lg;
211211
};

0 commit comments

Comments
 (0)