From f5e8090ae871c6075c29bb378da1204ef9c7beeb Mon Sep 17 00:00:00 2001 From: Swapnil Pimpale Date: Wed, 31 Jul 2013 17:37:25 +0530 Subject: [PATCH] LU-2940 llite: Fix for oops in vvp_pgcache_show() Hold the lock protecting page tree (coh_page_guard) till the point the page is being accessed. Signed-off-by: Swapnil Pimpale Change-Id: I9d1d5129d9cac8f1fa5eec77f554320c0c255fc2 Reviewed-on: http://review.whamcloud.com/7192 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- lustre/llite/vvp_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/llite/vvp_dev.c b/lustre/llite/vvp_dev.c index c0a636d..68ea741 100644 --- a/lustre/llite/vvp_dev.c +++ b/lustre/llite/vvp_dev.c @@ -453,7 +453,6 @@ static int vvp_pgcache_show(struct seq_file *f, void *v) spin_lock(&hdr->coh_page_guard); page = cl_page_lookup(hdr, id.vpi_index); - spin_unlock(&hdr->coh_page_guard); seq_printf(f, "%8x@"DFID": ", id.vpi_index, PFID(&hdr->coh_lu.loh_fid)); @@ -462,6 +461,7 @@ static int vvp_pgcache_show(struct seq_file *f, void *v) cl_page_put(env, page); } else seq_puts(f, "missing\n"); + spin_unlock(&hdr->coh_page_guard); lu_object_ref_del(&clob->co_lu, "dump", cfs_current()); cl_object_put(env, clob); } else -- 1.8.3.1