Whamcloud - gitweb
LU-11269 ptlrpc: request's counter in import
[fs/lustre-release.git] / lustre / ptlrpc / pinger.c
index 2a80c45..0650c2e 100644 (file)
@@ -101,14 +101,7 @@ static bool ptlrpc_check_import_is_idle(struct obd_import *imp)
        if (!imp->imp_idle_timeout)
                return false;
 
-       /*
-        * 4 comes from:
-        *  - client_obd_setup() - hashed import
-        *  - ptlrpcd_alloc_work()
-        *  - ptlrpcd_alloc_work()
-        *  - ptlrpc_pinger_add_import
-        */
-       if (refcount_read(&imp->imp_refcount) > 4)
+       if (atomic_read(&imp->imp_reqs) > 0)
                return false;
 
        /* any lock increases ns_bref being a resource holder */