diff --git a/mm/filemap.c b/mm/filemap.c
index 0b41c8cbeabc7a6b4e2533be1dfd74b9f10e29cd..65b4b6e7f7bde69620b73af705ecca33629a8f79 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1041,7 +1041,7 @@ void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter)
 	unsigned long flags;
 
 	spin_lock_irqsave(&q->lock, flags);
-	__add_wait_queue(q, waiter);
+	__add_wait_queue_entry_tail(q, waiter);
 	SetPageWaiters(page);
 	spin_unlock_irqrestore(&q->lock, flags);
 }