aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index aac3d3d..3194ed3 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -489,11 +489,11 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
}
-static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
+static int f2fs_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
- struct f2fs_sb_info *sbi = F2FS_SB(root->d_sb);
+ struct f2fs_sb_info *sbi = F2FS_SB(vfs->mnt_sb);
- if (!(root->d_sb->s_flags & MS_RDONLY) && test_opt(sbi, BG_GC))
+ if (!(vfs->mnt_sb->s_flags & MS_RDONLY) && test_opt(sbi, BG_GC))
seq_printf(seq, ",background_gc=%s", "on");
else
seq_printf(seq, ",background_gc=%s", "off");
@@ -865,7 +865,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
goto free_sb_buf;
sb->s_maxbytes = max_file_size(le32_to_cpu(raw_super->log_blocksize));
- sb->s_max_links = F2FS_LINK_MAX;
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
sb->s_op = &f2fs_sops;
@@ -975,7 +974,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
goto free_root_inode;
}
- sb->s_root = d_make_root(root); /* allocate root dentry */
+ sb->s_root = d_alloc_root(root); /* allocate root dentry */
if (!sb->s_root) {
err = -ENOMEM;
goto free_root_inode;
@@ -1036,8 +1035,7 @@ fail:
free_gc:
stop_gc_thread(sbi);
free_root_inode:
- dput(sb->s_root);
- sb->s_root = NULL;
+ iput(root);
free_node_inode:
iput(sbi->node_inode);
free_nm:
@@ -1069,6 +1067,7 @@ static struct file_system_type f2fs_fs_type = {
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
+MODULE_ALIAS_FS("f2fs");
static int __init init_inodecache(void)
{