Skip to content

Commit ccedf35

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

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
@@ -2161,8 +2161,8 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
21612161
* double allocate blocks. The reference is dropped
21622162
* in ext4_mb_release_context
21632163
*/
2164-
ac->ac_bitmap_page = &e4b->bd_bitmap_folio->page;
2165-
get_page(ac->ac_bitmap_page);
2164+
ac->ac_bitmap_folio = e4b->bd_bitmap_folio;
2165+
folio_get(ac->ac_bitmap_folio);
21662166
ac->ac_buddy_page = &e4b->bd_buddy_folio->page;
21672167
get_page(ac->ac_buddy_page);
21682168
/* store last allocated for subsequent stream allocation */
@@ -6002,8 +6002,8 @@ static void ext4_mb_release_context(struct ext4_allocation_context *ac)
60026002

60036003
ext4_mb_put_pa(ac, ac->ac_sb, pa);
60046004
}
6005-
if (ac->ac_bitmap_page)
6006-
put_page(ac->ac_bitmap_page);
6005+
if (ac->ac_bitmap_folio)
6006+
folio_put(ac->ac_bitmap_folio);
60076007
if (ac->ac_buddy_page)
60086008
put_page(ac->ac_buddy_page);
60096009
if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC)

fs/ext4/mballoc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ struct ext4_allocation_context {
204204
__u8 ac_2order; /* if request is to allocate 2^N blocks and
205205
* N > 0, the field stores N, otherwise 0 */
206206
__u8 ac_op; /* operation, for history only */
207-
struct page *ac_bitmap_page;
207+
struct folio *ac_bitmap_folio;
208208
struct page *ac_buddy_page;
209209
struct ext4_prealloc_space *ac_pa;
210210
struct ext4_locality_group *ac_lg;

0 commit comments

Comments
 (0)