File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,15 @@ static inline spinlock_t *pud_trans_huge_lock(pud_t *pud,
259
259
return NULL ;
260
260
}
261
261
262
+ /**
263
+ * thp_head - Head page of a transparent huge page.
264
+ * @page: Any page (tail, head or regular) found in the page cache.
265
+ */
266
+ static inline struct page * thp_head (struct page * page )
267
+ {
268
+ return compound_head (page );
269
+ }
270
+
262
271
/**
263
272
* thp_order - Order of a transparent huge page.
264
273
* @page: Head page of a transparent huge page.
@@ -335,6 +344,12 @@ static inline struct list_head *page_deferred_list(struct page *page)
335
344
#define HPAGE_PUD_MASK ({ BUILD_BUG(); 0; })
336
345
#define HPAGE_PUD_SIZE ({ BUILD_BUG(); 0; })
337
346
347
+ static inline struct page * thp_head (struct page * page )
348
+ {
349
+ VM_BUG_ON_PGFLAGS (PageTail (page ), page );
350
+ return page ;
351
+ }
352
+
338
353
static inline unsigned int thp_order (struct page * page )
339
354
{
340
355
VM_BUG_ON_PGFLAGS (PageTail (page ), page );
You can’t perform that action at this time.
0 commit comments