From: Hiroya Nozaki Date: Mon, 14 Sep 2015 22:41:25 +0000 (-0400) Subject: staging/lustre/osc: LBUG in osc_lru_reclaim X-Git-Tag: KARO-TX6UL-2015-11-03~34^2~1993 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0df83c184effeac5d05394b65ca7baef71f41178;p=karo-tx-linux.git staging/lustre/osc: LBUG in osc_lru_reclaim LASSERT touches cl_client_cache->ccc_lru without any protection. So this patch the LASSERT moves to the section protected by cl_client_cache->ccc_lru_lock Signed-off-by: Hiroya Nozaki Reviewed-on: http://review.whamcloud.com/14901 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6624 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 856d859c385e..2af3232230ec 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -818,7 +818,6 @@ static int osc_lru_reclaim(struct client_obd *cli) int rc; LASSERT(cache != NULL); - LASSERT(!list_empty(&cache->ccc_lru)); rc = osc_lru_shrink(cli, lru_shrink_min); if (rc != 0) { @@ -835,6 +834,8 @@ static int osc_lru_reclaim(struct client_obd *cli) /* Reclaim LRU slots from other client_obd as it can't free enough * from its own. This should rarely happen. */ spin_lock(&cache->ccc_lru_lock); + LASSERT(!list_empty(&cache->ccc_lru)); + cache->ccc_lru_shrinkers++; list_move_tail(&cli->cl_lru_osc, &cache->ccc_lru);