|
@@ -75,7 +75,7 @@ static unsigned long super_cache_scan(struct shrinker *shrink,
|
|
return SHRINK_STOP;
|
|
return SHRINK_STOP;
|
|
|
|
|
|
if (sb->s_op->nr_cached_objects)
|
|
if (sb->s_op->nr_cached_objects)
|
|
- fs_objects = sb->s_op->nr_cached_objects(sb, sc->nid);
|
|
|
|
|
|
+ fs_objects = sb->s_op->nr_cached_objects(sb, sc);
|
|
|
|
|
|
inodes = list_lru_shrink_count(&sb->s_inode_lru, sc);
|
|
inodes = list_lru_shrink_count(&sb->s_inode_lru, sc);
|
|
dentries = list_lru_shrink_count(&sb->s_dentry_lru, sc);
|
|
dentries = list_lru_shrink_count(&sb->s_dentry_lru, sc);
|
|
@@ -97,9 +97,10 @@ static unsigned long super_cache_scan(struct shrinker *shrink,
|
|
sc->nr_to_scan = inodes;
|
|
sc->nr_to_scan = inodes;
|
|
freed += prune_icache_sb(sb, sc);
|
|
freed += prune_icache_sb(sb, sc);
|
|
|
|
|
|
- if (fs_objects)
|
|
|
|
- freed += sb->s_op->free_cached_objects(sb, fs_objects,
|
|
|
|
- sc->nid);
|
|
|
|
|
|
+ if (fs_objects) {
|
|
|
|
+ sc->nr_to_scan = fs_objects;
|
|
|
|
+ freed += sb->s_op->free_cached_objects(sb, sc);
|
|
|
|
+ }
|
|
|
|
|
|
drop_super(sb);
|
|
drop_super(sb);
|
|
return freed;
|
|
return freed;
|
|
@@ -122,8 +123,7 @@ static unsigned long super_cache_count(struct shrinker *shrink,
|
|
* s_op->nr_cached_objects().
|
|
* s_op->nr_cached_objects().
|
|
*/
|
|
*/
|
|
if (sb->s_op && sb->s_op->nr_cached_objects)
|
|
if (sb->s_op && sb->s_op->nr_cached_objects)
|
|
- total_objects = sb->s_op->nr_cached_objects(sb,
|
|
|
|
- sc->nid);
|
|
|
|
|
|
+ total_objects = sb->s_op->nr_cached_objects(sb, sc);
|
|
|
|
|
|
total_objects += list_lru_shrink_count(&sb->s_dentry_lru, sc);
|
|
total_objects += list_lru_shrink_count(&sb->s_dentry_lru, sc);
|
|
total_objects += list_lru_shrink_count(&sb->s_inode_lru, sc);
|
|
total_objects += list_lru_shrink_count(&sb->s_inode_lru, sc);
|