From: Yang Sheng Date: Mon, 2 Feb 2015 02:52:16 +0000 (-0500) Subject: staging/lustre/llite: Add exception entry check after radix_tree X-Git-Tag: v5.15~16324^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=437dfb201a55ff73954ae7455ef3d17be4b1c0f6;p=platform%2Fkernel%2Flinux-starfive.git staging/lustre/llite: Add exception entry check after radix_tree We need to check for an exception entry after radix_tree lookup. Signed-off-by: Yang Sheng Signed-off-by: Oleg Drokin Reviewed-on: http://review.whamcloud.com/10709 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5162 Reviewed-by: Bob Glossman Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index babba60..69a4a63 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -278,7 +278,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash, spin_lock_irq(&mapping->tree_lock); found = radix_tree_gang_lookup(&mapping->page_tree, (void **)&page, offset, 1); - if (found > 0) { + if (found > 0 && !radix_tree_exceptional_entry(page)) { struct lu_dirpage *dp; page_cache_get(page);