Whamcloud - gitweb
LU-12651 osc: always call update_next_shrink
[fs/lustre-release.git] / lustre / osc / osc_request.c
index 10fcc44..a33641d 100644 (file)
@@ -843,8 +843,10 @@ static int osc_should_shrink_grant(struct client_obd *client)
                return 0;
 
        if (!OCD_HAS_FLAG(&client->cl_import->imp_connect_data, GRANT_SHRINK) ||
-           client->cl_import->imp_grant_shrink_disabled)
+           client->cl_import->imp_grant_shrink_disabled) {
+               osc_update_next_shrink(client);
                return 0;
+       }
 
        if (ktime_get_seconds() >= next_shrink - 5) {
                /* Get the current RPC size directly, instead of going via:
@@ -3377,10 +3379,6 @@ static int osc_cache_shrink(SHRINKER_ARGS(sc, nr_to_scan, gfp_mask))
                .nr_to_scan = shrink_param(sc, nr_to_scan),
                .gfp_mask   = shrink_param(sc, gfp_mask)
        };
-#if !defined(HAVE_SHRINKER_WANT_SHRINK_PTR) && !defined(HAVE_SHRINK_CONTROL)
-       struct shrinker *shrinker = NULL;
-#endif
-
        (void)osc_cache_shrink_scan(shrinker, &scv);
 
        return osc_cache_shrink_count(shrinker, &scv);