void zpl_prune_sb(int64_t nr_to_scan, void *arg) { struct super_block *sb = (struct super_block *)arg; int objects = 0; (void) -zfs_sb_prune(sb, nr_to_scan, &objects); }
/* * Linux 3.1 - 3.x API * * The Linux 3.1 API introduced per-sb cache shrinkers to replace the * global ones. This allows us a mechanism to cleanly target a specific * zfs file system when the dnode and inode caches grow too large. * * In addition, the 3.0 kernel added the iterate_supers_type() helper * function which is used to safely walk all of the zfs file systems. */ static void zpl_prune_sb(struct super_block *sb, void *arg) { int objects = 0; int error; error = -zfs_sb_prune(sb, *(unsigned long *)arg, &objects); ASSERT3S(error, <=, 0); }