Whamcloud - gitweb
LU-11518 ldlm: lru code cleanup
[fs/lustre-release.git] / lustre / ldlm / ldlm_pool.c
index e59c77c..b6d64f0 100644 (file)
@@ -474,7 +474,6 @@ static void ldlm_cli_pool_pop_slv(struct ldlm_pool *pl)
 static int ldlm_cli_pool_recalc(struct ldlm_pool *pl)
 {
        time64_t recalc_interval_sec;
-       enum ldlm_lru_flags lru_flags;
        int ret;
 
        ENTRY;
@@ -500,21 +499,12 @@ static int ldlm_cli_pool_recalc(struct ldlm_pool *pl)
        spin_unlock(&pl->pl_lock);
 
        /*
-        * Cancel aged locks if lru resize is disabled for this ns.
-        */
-       if (ns_connect_lru_resize(ldlm_pl2ns(pl)))
-               lru_flags = LDLM_LRU_FLAG_LRUR;
-       else
-               lru_flags = LDLM_LRU_FLAG_AGED;
-
-       /*
         * In the time of canceling locks on client we do not need to maintain
         * sharp timing, we only want to cancel locks asap according to new SLV.
         * It may be called when SLV has changed much, this is why we do not
         * take into account pl->pl_recalc_time here.
         */
-       ret = ldlm_cancel_lru(ldlm_pl2ns(pl), 0, LCF_ASYNC,
-                             lru_flags);
+       ret = ldlm_cancel_lru(ldlm_pl2ns(pl), 0, LCF_ASYNC, 0);
 
        spin_lock(&pl->pl_lock);
        /*
@@ -559,7 +549,7 @@ static int ldlm_cli_pool_shrink(struct ldlm_pool *pl,
        if (nr == 0)
                return (unused / 100) * sysctl_vfs_cache_pressure;
        else
-               return ldlm_cancel_lru(ns, nr, LCF_ASYNC, LDLM_LRU_FLAG_SHRINK);
+               return ldlm_cancel_lru(ns, nr, LCF_ASYNC, 0);
 }
 
 static struct ldlm_pool_ops ldlm_srv_pool_ops = {