diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2013-06-07 02:16:53 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-11 03:01:08 -0400 |
commit | 5fb08372a689360b7db51b0cfb9a068fddf279a2 (patch) | |
tree | 1899d95dff9cde638d3f1d7a9b1a17546b1c531c /fs/f2fs | |
parent | 8ae8f1627f39bae505b90cade50cd8a911b8bda6 (diff) |
f2fs: set sb->s_fs_info before calling parse_options()
In f2fs_fill_super(), set sb->s_fs_info before calling parse_options(), then we can get
f2fs_sb_info via F2FS_SB(sb) in parse_options().
So that the second argument "sbi" of func parse_options() is no longer needed.
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 3ac305da7cee..4fdcdff45e6a 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -303,9 +303,9 @@ static const struct export_operations f2fs_export_ops = { | |||
303 | .get_parent = f2fs_get_parent, | 303 | .get_parent = f2fs_get_parent, |
304 | }; | 304 | }; |
305 | 305 | ||
306 | static int parse_options(struct super_block *sb, struct f2fs_sb_info *sbi, | 306 | static int parse_options(struct super_block *sb, char *options) |
307 | char *options) | ||
308 | { | 307 | { |
308 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
309 | substring_t args[MAX_OPT_ARGS]; | 309 | substring_t args[MAX_OPT_ARGS]; |
310 | char *p; | 310 | char *p; |
311 | int arg = 0; | 311 | int arg = 0; |
@@ -541,6 +541,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) | |||
541 | if (err) | 541 | if (err) |
542 | goto free_sb_buf; | 542 | goto free_sb_buf; |
543 | } | 543 | } |
544 | sb->s_fs_info = sbi; | ||
544 | /* init some FS parameters */ | 545 | /* init some FS parameters */ |
545 | sbi->active_logs = NR_CURSEG_TYPE; | 546 | sbi->active_logs = NR_CURSEG_TYPE; |
546 | 547 | ||
@@ -553,7 +554,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) | |||
553 | set_opt(sbi, POSIX_ACL); | 554 | set_opt(sbi, POSIX_ACL); |
554 | #endif | 555 | #endif |
555 | /* parse mount options */ | 556 | /* parse mount options */ |
556 | err = parse_options(sb, sbi, (char *)data); | 557 | err = parse_options(sb, (char *)data); |
557 | if (err) | 558 | if (err) |
558 | goto free_sb_buf; | 559 | goto free_sb_buf; |
559 | 560 | ||
@@ -565,7 +566,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) | |||
565 | sb->s_xattr = f2fs_xattr_handlers; | 566 | sb->s_xattr = f2fs_xattr_handlers; |
566 | sb->s_export_op = &f2fs_export_ops; | 567 | sb->s_export_op = &f2fs_export_ops; |
567 | sb->s_magic = F2FS_SUPER_MAGIC; | 568 | sb->s_magic = F2FS_SUPER_MAGIC; |
568 | sb->s_fs_info = sbi; | ||
569 | sb->s_time_gran = 1; | 569 | sb->s_time_gran = 1; |
570 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | | 570 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | |
571 | (test_opt(sbi, POSIX_ACL) ? MS_POSIXACL : 0); | 571 | (test_opt(sbi, POSIX_ACL) ? MS_POSIXACL : 0); |