aboutsummaryrefslogtreecommitdiffstats
path: root/mm/truncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/truncate.c')
-rw-r--r--mm/truncate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index 75801acdaac7..f38055cb8af6 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -394,11 +394,12 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page)
394 if (page_has_private(page) && !try_to_release_page(page, GFP_KERNEL)) 394 if (page_has_private(page) && !try_to_release_page(page, GFP_KERNEL))
395 return 0; 395 return 0;
396 396
397 clear_page_mlock(page);
398
397 spin_lock_irq(&mapping->tree_lock); 399 spin_lock_irq(&mapping->tree_lock);
398 if (PageDirty(page)) 400 if (PageDirty(page))
399 goto failed; 401 goto failed;
400 402
401 clear_page_mlock(page);
402 BUG_ON(page_has_private(page)); 403 BUG_ON(page_has_private(page));
403 __delete_from_page_cache(page); 404 __delete_from_page_cache(page);
404 spin_unlock_irq(&mapping->tree_lock); 405 spin_unlock_irq(&mapping->tree_lock);