函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:fs\dcache.c Create Date:2022-07-29 10:37:29
首页 Copyright©Brick

1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
/**
 * shrink_dcache_sb - shrink dcache for a superblock
 * @sb: superblock
 *
 * Shrink the dcache for the specified super block. This is used to free
 * the dcache before unmounting a file system.
 */
void shrink_dcache_sb(struct super_block *sb)
{
    do {
        LIST_HEAD(dispose);
 
        list_lru_walk(&sb->s_dentry_lru,
            dentry_lru_isolate_shrink, &dispose, 1024);
        shrink_dentry_list(&dispose);
    } while (list_lru_count(&sb->s_dentry_lru) > 0);
}