summaryrefslogtreecommitdiff
path: root/mm/folio-compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r--mm/folio-compat.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index 18c48b557926..540373cf904e 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -115,9 +115,15 @@ EXPORT_SYMBOL(grab_cache_page_write_begin);
int isolate_lru_page(struct page *page)
{
+ bool ret;
+
if (WARN_RATELIMIT(PageTail(page), "trying to isolate tail page"))
return -EBUSY;
- return folio_isolate_lru((struct folio *)page);
+ ret = folio_isolate_lru((struct folio *)page);
+ if (ret)
+ return 0;
+
+ return -EBUSY;
}
void putback_lru_page(struct page *page)