Whamcloud - gitweb
LU-13719 lov: doesn't check lov_refcount 02/39702/2
authorHongchao Zhang <hongchao@whamcloud.com>
Fri, 21 Aug 2020 10:17:12 +0000 (18:17 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 29 Oct 2020 04:28:37 +0000 (04:28 +0000)
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 <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/39702
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_obd.c

index 869819b..7972d62 100644 (file)
@@ -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. */