From 1fee634f1ebfeccb1770951ca7b576f8b6e733a0 Mon Sep 17 00:00:00 2001 From: Hiroya Nozaki Date: Thu, 21 May 2015 15:46:59 +0900 Subject: [PATCH] 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 --- lustre/osc/osc_page.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 1.8.3.1