From 6ae92a7f1bd94c8182c1cc05fad8d3c394c0d959 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Fri, 21 Aug 2020 18:17:12 +0800 Subject: [PATCH] LU-13719 lov: doesn't check lov_refcount In lov_cleanup, the check of each OSC is protected by lov_tgt_getrefs, which will increment the "lov_refcount", so the "lov_refcount" shouldn't be checked inside because it is always larger than 0. Change-Id: I21423d4345190b3e02eb00734c127e35cbc9b1af Signed-off-by: Hongchao Zhang Reviewed-on: https://review.whamcloud.com/39702 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- lustre/lov/lov_obd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 869819b..7972d62 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -813,8 +813,7 @@ static int lov_cleanup(struct obd_device *obd) continue; /* Inactive targets may never have connected */ - if (lov->lov_tgts[i]->ltd_active || - atomic_read(&lov->lov_refcount)) + if (lov->lov_tgts[i]->ltd_active) /* We should never get here - these * should have been removed in the * disconnect. */ -- 1.8.3.1