super: fix calculation of shrinkable objects for small numbers
[linux-2.6-block.git] / fs / quota / dquot.c
index 9a702e1935383d1e8deda7678e529426262a8636..13eee847605cad84e096d1d905c92f727b6a67f9 100644 (file)
@@ -719,9 +719,8 @@ static int shrink_dqcache_memory(struct shrinker *shrink,
                prune_dqcache(nr);
                spin_unlock(&dq_list_lock);
        }
-       return ((unsigned)
-               percpu_counter_read_positive(&dqstats.counter[DQST_FREE_DQUOTS])
-               /100) * sysctl_vfs_cache_pressure;
+       return vfs_pressure_ratio(
+       percpu_counter_read_positive(&dqstats.counter[DQST_FREE_DQUOTS]));
 }
 
 static struct shrinker dqcache_shrinker = {