Skip to content

Commit 43d5806

Browse files
NeilBrownOleg Drokin
authored andcommitted
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 <[email protected]> Signed-off-by: NeilBrown <[email protected]> Reviewed-on: https://review.whamcloud.com/35462 Tested-by: jenkins <[email protected]> Reviewed-by: Lai Siyao <[email protected]> Tested-by: Maloo <[email protected]> Reviewed-by: Oleg Drokin <[email protected]>
1 parent f114d4d commit 43d5806

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lustre/llite/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void ll_release_page(struct inode *inode, struct page *page,
171171
if (remove) {
172172
lock_page(page);
173173
if (likely(page->mapping != NULL))
174-
truncate_complete_page(page->mapping, page);
174+
delete_from_page_cache(page);
175175
unlock_page(page);
176176
}
177177
put_page(page);

lustre/mdc/mdc_request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ static void mdc_release_page(struct page *page, int remove)
11161116
if (remove) {
11171117
lock_page(page);
11181118
if (likely(page->mapping != NULL))
1119-
truncate_complete_page(page->mapping, page);
1119+
delete_from_page_cache(page);
11201120
unlock_page(page);
11211121
}
11221122
put_page(page);

0 commit comments

Comments
 (0)