From 43d5806ffe6d6017aea0892de78dc27e54861de1 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 10 Jul 2019 20:50:22 -0400 Subject: [PATCH] LU-12477 lustre: use delete_from_page_cache() for directory pages. lustre sometimes uses the internal function truncate_complete_page() to remove a page of a directory. Much of what this function does, does not apply to directory pages as there is no invalidatepage function, and at these times, the page is not dirty. The only useful part of the function is delete_from_page_cache(), so just call that directly. Linux-commit: d17fa2f3a0b9b40be48e0c3cc88eb3b3cea1b701 Change-Id: I54795e71e107c50f662bd2015c6f621bfe436e0a Acked-by: Oleg Drokin Signed-off-by: NeilBrown Reviewed-on: https://review.whamcloud.com/35462 Tested-by: jenkins Reviewed-by: Lai Siyao Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/llite/dir.c | 2 +- lustre/mdc/mdc_request.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index a2d3d4b..b2227af 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -171,7 +171,7 @@ void ll_release_page(struct inode *inode, struct page *page, if (remove) { lock_page(page); if (likely(page->mapping != NULL)) - truncate_complete_page(page->mapping, page); + delete_from_page_cache(page); unlock_page(page); } put_page(page); diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index a432422..47bf7ec 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -1116,7 +1116,7 @@ static void mdc_release_page(struct page *page, int remove) if (remove) { lock_page(page); if (likely(page->mapping != NULL)) - truncate_complete_page(page->mapping, page); + delete_from_page_cache(page); unlock_page(page); } put_page(page); -- 1.8.3.1