]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/huge_memory.c
target/user: Fix time calc in expired cmd processing
[karo-tx-linux.git] / mm / huge_memory.c
index 73266ee7274c650c06925456a18bc8fb6fb407c5..62fe06bb7d04bacccc8c2213a6a65134fa274010 100644 (file)
@@ -151,7 +151,7 @@ static int start_stop_khugepaged(void)
                if (!khugepaged_thread)
                        khugepaged_thread = kthread_run(khugepaged, NULL,
                                                        "khugepaged");
-               if (unlikely(IS_ERR(khugepaged_thread))) {
+               if (IS_ERR(khugepaged_thread)) {
                        pr_err("khugepaged: kthread_run(khugepaged) failed\n");
                        err = PTR_ERR(khugepaged_thread);
                        khugepaged_thread = NULL;
@@ -1755,8 +1755,7 @@ static void __split_huge_page_refcount(struct page *page,
                                      (1L << PG_unevictable)));
                page_tail->flags |= (1L << PG_dirty);
 
-               /* clear PageTail before overwriting first_page */
-               smp_wmb();
+               clear_compound_head(page_tail);
 
                if (page_is_young(page))
                        set_page_young(page_tail);
@@ -2010,7 +2009,7 @@ int hugepage_madvise(struct vm_area_struct *vma,
                /*
                 * Be somewhat over-protective like KSM for now!
                 */
-               if (*vm_flags & (VM_HUGEPAGE | VM_NO_THP))
+               if (*vm_flags & VM_NO_THP)
                        return -EINVAL;
                *vm_flags &= ~VM_NOHUGEPAGE;
                *vm_flags |= VM_HUGEPAGE;
@@ -2026,7 +2025,7 @@ int hugepage_madvise(struct vm_area_struct *vma,
                /*
                 * Be somewhat over-protective like KSM for now!
                 */
-               if (*vm_flags & (VM_NOHUGEPAGE | VM_NO_THP))
+               if (*vm_flags & VM_NO_THP)
                        return -EINVAL;
                *vm_flags &= ~VM_HUGEPAGE;
                *vm_flags |= VM_NOHUGEPAGE;