summaryrefslogtreecommitdiffstats
path: root/drivers/staging/erofs/super.c
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2018-07-26 20:22:03 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-27 17:24:09 +0200
commit2497ee41295c769dc74cb8bac7e03842bc51d331 (patch)
tree680ddbe6352f42c885f4b82560737049de9be88a /drivers/staging/erofs/super.c
parent0d40d6e399c12c662eda395fe4f0602327d0d01f (diff)
downloadlinux-2497ee41295c769dc74cb8bac7e03842bc51d331.tar.bz2
staging: erofs: introduce superblock registration
In order to introducing shrinker solution for erofs, let's manage all mounted erofs instances at first. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/erofs/super.c')
-rw-r--r--drivers/staging/erofs/super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index 054375d6ecce..f455d7135599 100644
--- a/drivers/staging/erofs/super.c
+++ b/drivers/staging/erofs/super.c
@@ -326,6 +326,8 @@ static int erofs_read_super(struct super_block *sb,
snprintf(sbi->dev_name, PATH_MAX, "%s", dev_name);
sbi->dev_name[PATH_MAX - 1] = '\0';
+ erofs_register_super(sb);
+
/*
* We already have a positive dentry, which was instantiated
* by d_make_root. Just need to d_rehash it.
@@ -373,6 +375,8 @@ static void erofs_put_super(struct super_block *sb)
infoln("unmounted for %s", sbi->dev_name);
__putname(sbi->dev_name);
+ erofs_unregister_super(sb);
+
kfree(sbi);
sb->s_fs_info = NULL;
}