Merge remote-tracking branch 'sound-asoc/for-next'
[deliverable/linux.git] / fs / f2fs / super.c
index 1b86d3f638efcf87435da17af79811237fc584a9..555217fe43ce0986c4716ac5c2531442a2b8066c 100644 (file)
@@ -87,6 +87,7 @@ enum {
        Opt_inline_xattr,
        Opt_inline_data,
        Opt_inline_dentry,
+       Opt_noinline_dentry,
        Opt_flush_merge,
        Opt_noflush_merge,
        Opt_nobarrier,
@@ -118,6 +119,7 @@ static match_table_t f2fs_tokens = {
        {Opt_inline_xattr, "inline_xattr"},
        {Opt_inline_data, "inline_data"},
        {Opt_inline_dentry, "inline_dentry"},
+       {Opt_noinline_dentry, "noinline_dentry"},
        {Opt_flush_merge, "flush_merge"},
        {Opt_noflush_merge, "noflush_merge"},
        {Opt_nobarrier, "nobarrier"},
@@ -488,6 +490,9 @@ static int parse_options(struct super_block *sb, char *options)
                case Opt_inline_dentry:
                        set_opt(sbi, INLINE_DENTRY);
                        break;
+               case Opt_noinline_dentry:
+                       clear_opt(sbi, INLINE_DENTRY);
+                       break;
                case Opt_flush_merge:
                        set_opt(sbi, FLUSH_MERGE);
                        break;
@@ -706,8 +711,6 @@ static void destroy_percpu_info(struct f2fs_sb_info *sbi)
                percpu_counter_destroy(&sbi->nr_pages[i]);
        percpu_counter_destroy(&sbi->alloc_valid_block_count);
        percpu_counter_destroy(&sbi->total_valid_inode_count);
-
-       percpu_free_rwsem(&sbi->cp_rwsem);
 }
 
 static void f2fs_put_super(struct super_block *sb)
@@ -880,6 +883,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
                seq_puts(seq, ",noinline_data");
        if (test_opt(sbi, INLINE_DENTRY))
                seq_puts(seq, ",inline_dentry");
+       else
+               seq_puts(seq, ",noinline_dentry");
        if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE))
                seq_puts(seq, ",flush_merge");
        if (test_opt(sbi, NOBARRIER))
@@ -977,6 +982,7 @@ static void default_options(struct f2fs_sb_info *sbi)
 
        set_opt(sbi, BG_GC);
        set_opt(sbi, INLINE_DATA);
+       set_opt(sbi, INLINE_DENTRY);
        set_opt(sbi, EXTENT_CACHE);
        sbi->sb->s_flags |= MS_LAZYTIME;
        set_opt(sbi, FLUSH_MERGE);
@@ -1483,9 +1489,6 @@ static int init_percpu_info(struct f2fs_sb_info *sbi)
 {
        int i, err;
 
-       if (percpu_init_rwsem(&sbi->cp_rwsem))
-               return -ENOMEM;
-
        for (i = 0; i < NR_COUNT_TYPE; i++) {
                err = percpu_counter_init(&sbi->nr_pages[i], 0, GFP_KERNEL);
                if (err)
@@ -1686,6 +1689,7 @@ try_onemore:
                sbi->write_io[i].bio = NULL;
        }
 
+       init_rwsem(&sbi->cp_rwsem);
        init_waitqueue_head(&sbi->cp_wait);
        init_sb_info(sbi);
 
This page took 0.027012 seconds and 5 git commands to generate.