From: Hiroya Nozaki Date: Thu, 21 May 2015 06:46:59 +0000 (+0900) Subject: LU-6624 osc: LBUG in osc_lru_reclaim X-Git-Tag: 2.7.55~28 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F14901%2F3;p=fs%2Flustre-release.git LU-6624 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 Change-Id: I1bc7829e4114a986a8299d652b978da1842829a5 Reviewed-on: http://review.whamcloud.com/14901 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_page.c b/lustre/osc/osc_page.c index a4ab52e..d187032 100644 --- a/lustre/osc/osc_page.c +++ b/lustre/osc/osc_page.c @@ -790,7 +790,6 @@ long osc_lru_reclaim(struct client_obd *cli) ENTRY; LASSERT(cache != NULL); - LASSERT(!list_empty(&cache->ccc_lru)); env = cl_env_nested_get(&nest); if (IS_ERR(env)) @@ -814,6 +813,8 @@ long 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);