From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752297AbbINWm0 (ORCPT ); Mon, 14 Sep 2015 18:42:26 -0400 Received: from linuxhacker.ru ([217.76.32.60]:44263 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752148AbbINWmX (ORCPT ); Mon, 14 Sep 2015 18:42:23 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Hiroya Nozaki , Oleg Drokin Subject: [PATCH 09/19] staging/lustre/osc: LBUG in osc_lru_reclaim Date: Mon, 14 Sep 2015 18:41:25 -0400 Message-Id: <1442270495-1655259-10-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1442270495-1655259-1-git-send-email-green@linuxhacker.ru> References: <1442270495-1655259-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hiroya Nozaki 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 --- drivers/staging/lustre/lustre/osc/osc_page.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 856d859..2af3232 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); -- 2.1.0