X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosc%2Fosc_page.c;h=fd4c1f302102a7fab73cd260d597d7bb8e303f28;hb=c524079f4f59a39b99467d9868ee4aafdcf033e9;hp=fa5d86e0f2ea4e798998c215d35b3c86016ee339;hpb=99e6bc29a437cac43fee499d6f9a2c17854468ee;p=fs%2Flustre-release.git diff --git a/lustre/osc/osc_page.c b/lustre/osc/osc_page.c index fa5d86e..fd4c1f3 100644 --- a/lustre/osc/osc_page.c +++ b/lustre/osc/osc_page.c @@ -539,8 +539,13 @@ static inline bool lru_page_busy(struct client_obd *cli, struct cl_page *page) if (cli->cl_cache->ccc_unstable_check) { struct page *vmpage = cl_page_vmpage(page); - /* vmpage have two known users: cl_page and VM page cache */ - if (page_count(vmpage) - page_mapcount(vmpage) > 2) + /* this check is racy because the vmpage is not locked, but + * that's OK - the code which does the actual page release + * checks this again before releasing + * + * vmpage have two known users: cl_page and VM page cache + */ + if (vmpage_in_use(vmpage, 0)) return true; } return false;