From: Jinshan Xiong Date: Thu, 3 Nov 2016 01:25:03 +0000 (-0400) Subject: staging/lustre/llite: do not clear uptodate bit in page delete X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7995035f0df50973a15eeb69cfc02446ddacbbbc;p=linux-beck.git staging/lustre/llite: do not clear uptodate bit in page delete Otherwise, if the race between page fault and truncate occurs, it will cause the page fault routine to return an EIO error. In filemap_fault() { page_not_uptodate: ... ClearPageError(page); error = mapping->a_ops->readpage(file, page); if (!error) { wait_on_page_locked(page); if (!PageUptodate(page)) error = -EIO; } ... } However, I tend to think this is a defect in kernel implementation, because it assumes PageUptodate shouldn't be cleared but file read routine doesn't make the same assumption. Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/22827 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8633 Reviewed-by: Li Dongyang Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c b/drivers/staging/lustre/lustre/llite/vvp_page.c index 25490a5188d3..23d66308ff20 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_page.c +++ b/drivers/staging/lustre/lustre/llite/vvp_page.c @@ -166,7 +166,6 @@ static void vvp_page_delete(const struct lu_env *env, refc = atomic_dec_return(&page->cp_ref); LASSERTF(refc >= 1, "page = %p, refc = %d\n", page, refc); - ClearPageUptodate(vmpage); ClearPagePrivate(vmpage); vmpage->private = 0; /*