X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_patchless_compat.h;h=c62e4d5c930ef2351457982d55819d03463e78f5;hb=6acf93339ad3297f2e5c659f2269c05df6198f74;hp=3ef2b0b2303d99e01725ae839f6d83df5ec5ef39;hpb=bca975c7fa261ffb926e8a18d5869b886c65f447;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_patchless_compat.h b/lustre/include/lustre_patchless_compat.h index 3ef2b0b..c62e4d5 100644 --- a/lustre/include/lustre_patchless_compat.h +++ b/lustre/include/lustre_patchless_compat.h @@ -38,10 +38,9 @@ #define LUSTRE_PATCHLESS_COMPAT_H #include - +#include #ifndef HAVE_TRUNCATE_COMPLETE_PAGE #include -#include #include #ifndef HAVE_DELETE_FROM_PAGE_CACHE /* 2.6.39 */ @@ -87,7 +86,12 @@ truncate_complete_page(struct address_space *mapping, struct page *page) #else page->mapping->a_ops->invalidatepage(page, 0); #endif +#ifdef HAVE_CANCEL_DIRTY_PAGE cancel_dirty_page(page, PAGE_SIZE); +#else + if (TestClearPageDirty(page)) + account_page_cleaned(page, mapping); +#endif /* HAVE_CANCEL_DIRTY_PAGE */ ClearPageMappedToDisk(page); ll_delete_from_page_cache(page); }