shmem: fix nlink for rename overwrite directory
[platform/adaptation/renesas_rcar/renesas_kernel.git] / mm / mlock.c
index b30adbe..b1eb536 100644 (file)
@@ -79,6 +79,7 @@ void clear_page_mlock(struct page *page)
  */
 void mlock_vma_page(struct page *page)
 {
+       /* Serialize with page migration */
        BUG_ON(!PageLocked(page));
 
        if (!TestSetPageMlocked(page)) {
@@ -174,6 +175,7 @@ unsigned int munlock_vma_page(struct page *page)
        unsigned int nr_pages;
        struct zone *zone = page_zone(page);
 
+       /* For try_to_munlock() and to serialize with page migration */
        BUG_ON(!PageLocked(page));
 
        /*
@@ -279,8 +281,8 @@ static int __mlock_posix_error_return(long retval)
 static bool __putback_lru_fast_prepare(struct page *page, struct pagevec *pvec,
                int *pgrescued)
 {
-       VM_BUG_ON(PageLRU(page));
-       VM_BUG_ON(!PageLocked(page));
+       VM_BUG_ON_PAGE(PageLRU(page), page);
+       VM_BUG_ON_PAGE(!PageLocked(page), page);
 
        if (page_mapcount(page) <= 1 && page_evictable(page)) {
                pagevec_add(pvec, page);