mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
mm/folio_queue: delete __folio_order and use folio_order directly
__folio_order is the same as folio_order, remove __folio_order and then just include mm.h and use folio_order directly. Link: https://lkml.kernel.org/r/20250212025843.80283-2-liuye@kylinos.cn Signed-off-by: Liu Ye <liuye@kylinos.cn> Reviewed-by: Shivank Garg <shivankg@amd.com> Reviewed-by: Dev Jain <dev.jain@arm.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Christian Brauner <brauner@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
9fa26fb554
commit
58abac769b
1 changed files with 3 additions and 9 deletions
|
@ -15,6 +15,7 @@
|
|||
#define _LINUX_FOLIO_QUEUE_H
|
||||
|
||||
#include <linux/pagevec.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
/*
|
||||
* Segment in a queue of running buffers. Each segment can hold a number of
|
||||
|
@ -216,13 +217,6 @@ static inline void folioq_unmark3(struct folio_queue *folioq, unsigned int slot)
|
|||
clear_bit(slot, &folioq->marks3);
|
||||
}
|
||||
|
||||
static inline unsigned int __folio_order(struct folio *folio)
|
||||
{
|
||||
if (!folio_test_large(folio))
|
||||
return 0;
|
||||
return folio->_flags_1 & 0xff;
|
||||
}
|
||||
|
||||
/**
|
||||
* folioq_append: Add a folio to a folio queue segment
|
||||
* @folioq: The segment to add to
|
||||
|
@ -241,7 +235,7 @@ static inline unsigned int folioq_append(struct folio_queue *folioq, struct foli
|
|||
unsigned int slot = folioq->vec.nr++;
|
||||
|
||||
folioq->vec.folios[slot] = folio;
|
||||
folioq->orders[slot] = __folio_order(folio);
|
||||
folioq->orders[slot] = folio_order(folio);
|
||||
return slot;
|
||||
}
|
||||
|
||||
|
@ -263,7 +257,7 @@ static inline unsigned int folioq_append_mark(struct folio_queue *folioq, struct
|
|||
unsigned int slot = folioq->vec.nr++;
|
||||
|
||||
folioq->vec.folios[slot] = folio;
|
||||
folioq->orders[slot] = __folio_order(folio);
|
||||
folioq->orders[slot] = folio_order(folio);
|
||||
folioq_mark(folioq, slot);
|
||||
return slot;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue