···377377 kfree(info);378378}379379380380-/**381381- * kernfs_pin_sb: try to pin the superblock associated with a kernfs_root382382- * @kernfs_root: the kernfs_root in question383383- * @ns: the namespace tag384384- *385385- * Pin the superblock so the superblock won't be destroyed in subsequent386386- * operations. This can be used to block ->kill_sb() which may be useful387387- * for kernfs users which dynamically manage superblocks.388388- *389389- * Returns NULL if there's no superblock associated to this kernfs_root, or390390- * -EINVAL if the superblock is being freed.391391- */392392-struct super_block *kernfs_pin_sb(struct kernfs_root *root, const void *ns)393393-{394394- struct kernfs_super_info *info;395395- struct super_block *sb = NULL;396396-397397- mutex_lock(&kernfs_mutex);398398- list_for_each_entry(info, &root->supers, node) {399399- if (info->ns == ns) {400400- sb = info->sb;401401- if (!atomic_inc_not_zero(&info->sb->s_active))402402- sb = ERR_PTR(-EINVAL);403403- break;404404- }405405- }406406- mutex_unlock(&kernfs_mutex);407407- return sb;408408-}409409-410380void __init kernfs_init(void)411381{412382