File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,19 @@ static inline spinlock_t *pud_trans_huge_lock(pud_t *pud,
258
258
else
259
259
return NULL ;
260
260
}
261
+
262
+ /**
263
+ * thp_order - Order of a transparent huge page.
264
+ * @page: Head page of a transparent huge page.
265
+ */
266
+ static inline unsigned int thp_order (struct page * page )
267
+ {
268
+ VM_BUG_ON_PGFLAGS (PageTail (page ), page );
269
+ if (PageHead (page ))
270
+ return HPAGE_PMD_ORDER ;
271
+ return 0 ;
272
+ }
273
+
261
274
static inline int hpage_nr_pages (struct page * page )
262
275
{
263
276
if (unlikely (PageTransHuge (page )))
@@ -317,6 +330,12 @@ static inline struct list_head *page_deferred_list(struct page *page)
317
330
#define HPAGE_PUD_MASK ({ BUILD_BUG(); 0; })
318
331
#define HPAGE_PUD_SIZE ({ BUILD_BUG(); 0; })
319
332
333
+ static inline unsigned int thp_order (struct page * page )
334
+ {
335
+ VM_BUG_ON_PGFLAGS (PageTail (page ), page );
336
+ return 0 ;
337
+ }
338
+
320
339
static inline int hpage_nr_pages (struct page * page )
321
340
{
322
341
VM_BUG_ON_PAGE (PageTail (page ), page );
You can’t perform that action at this time.
0 commit comments