From: Swapnil Pimpale Date: Wed, 31 Jul 2013 12:07:25 +0000 (+0530) Subject: LU-2940 llite: Fix for oops in vvp_pgcache_show() X-Git-Tag: 2.4.90~5 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=f5e8090ae871c6075c29bb378da1204ef9c7beeb;p=fs%2Flustre-release.git 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 --- 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