We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b593b90 commit b2bd53fCopy full SHA for b2bd53f
include/linux/huge_mm.h
@@ -152,15 +152,13 @@ static inline bool __transparent_hugepage_enabled(struct vm_area_struct *vma)
152
153
bool transparent_hugepage_enabled(struct vm_area_struct *vma);
154
155
-#define HPAGE_CACHE_INDEX_MASK (HPAGE_PMD_NR - 1)
156
-
157
static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
158
unsigned long haddr)
159
{
160
/* Don't have to check pgoff for anonymous vma */
161
if (!vma_is_anonymous(vma)) {
162
- if (((vma->vm_start >> PAGE_SHIFT) & HPAGE_CACHE_INDEX_MASK) !=
163
- (vma->vm_pgoff & HPAGE_CACHE_INDEX_MASK))
+ if (!IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff,
+ HPAGE_PMD_NR))
164
return false;
165
}
166
0 commit comments