diff options
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index e2dcc9c733f7..70dfdd532b83 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/crc32.h> | 47 | #include <linux/crc32.h> |
48 | #include <linux/vfs.h> | 48 | #include <linux/vfs.h> |
49 | #include <linux/writeback.h> | 49 | #include <linux/writeback.h> |
50 | #include <linux/kobject.h> | ||
51 | #include <linux/seq_file.h> | 50 | #include <linux/seq_file.h> |
52 | #include <linux/mount.h> | 51 | #include <linux/mount.h> |
53 | #include "nilfs.h" | 52 | #include "nilfs.h" |
@@ -111,12 +110,17 @@ void nilfs_error(struct super_block *sb, const char *function, | |||
111 | const char *fmt, ...) | 110 | const char *fmt, ...) |
112 | { | 111 | { |
113 | struct nilfs_sb_info *sbi = NILFS_SB(sb); | 112 | struct nilfs_sb_info *sbi = NILFS_SB(sb); |
113 | struct va_format vaf; | ||
114 | va_list args; | 114 | va_list args; |
115 | 115 | ||
116 | va_start(args, fmt); | 116 | va_start(args, fmt); |
117 | printk(KERN_CRIT "NILFS error (device %s): %s: ", sb->s_id, function); | 117 | |
118 | vprintk(fmt, args); | 118 | vaf.fmt = fmt; |
119 | printk("\n"); | 119 | vaf.va = &args; |
120 | |||
121 | printk(KERN_CRIT "NILFS error (device %s): %s: %pV\n", | ||
122 | sb->s_id, function, &vaf); | ||
123 | |||
120 | va_end(args); | 124 | va_end(args); |
121 | 125 | ||
122 | if (!(sb->s_flags & MS_RDONLY)) { | 126 | if (!(sb->s_flags & MS_RDONLY)) { |
@@ -136,13 +140,17 @@ void nilfs_error(struct super_block *sb, const char *function, | |||
136 | void nilfs_warning(struct super_block *sb, const char *function, | 140 | void nilfs_warning(struct super_block *sb, const char *function, |
137 | const char *fmt, ...) | 141 | const char *fmt, ...) |
138 | { | 142 | { |
143 | struct va_format vaf; | ||
139 | va_list args; | 144 | va_list args; |
140 | 145 | ||
141 | va_start(args, fmt); | 146 | va_start(args, fmt); |
142 | printk(KERN_WARNING "NILFS warning (device %s): %s: ", | 147 | |
143 | sb->s_id, function); | 148 | vaf.fmt = fmt; |
144 | vprintk(fmt, args); | 149 | vaf.va = &args; |
145 | printk("\n"); | 150 | |
151 | printk(KERN_WARNING "NILFS warning (device %s): %s: %pV\n", | ||
152 | sb->s_id, function, &vaf); | ||
153 | |||
146 | va_end(args); | 154 | va_end(args); |
147 | } | 155 | } |
148 | 156 | ||
@@ -1010,11 +1018,11 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data) | |||
1010 | struct nilfs_sb_info *sbi = NILFS_SB(sb); | 1018 | struct nilfs_sb_info *sbi = NILFS_SB(sb); |
1011 | struct the_nilfs *nilfs = sbi->s_nilfs; | 1019 | struct the_nilfs *nilfs = sbi->s_nilfs; |
1012 | unsigned long old_sb_flags; | 1020 | unsigned long old_sb_flags; |
1013 | struct nilfs_mount_options old_opts; | 1021 | unsigned long old_mount_opt; |
1014 | int err; | 1022 | int err; |
1015 | 1023 | ||
1016 | old_sb_flags = sb->s_flags; | 1024 | old_sb_flags = sb->s_flags; |
1017 | old_opts.mount_opt = sbi->s_mount_opt; | 1025 | old_mount_opt = sbi->s_mount_opt; |
1018 | 1026 | ||
1019 | if (!parse_options(data, sb, 1)) { | 1027 | if (!parse_options(data, sb, 1)) { |
1020 | err = -EINVAL; | 1028 | err = -EINVAL; |
@@ -1083,7 +1091,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data) | |||
1083 | 1091 | ||
1084 | restore_opts: | 1092 | restore_opts: |
1085 | sb->s_flags = old_sb_flags; | 1093 | sb->s_flags = old_sb_flags; |
1086 | sbi->s_mount_opt = old_opts.mount_opt; | 1094 | sbi->s_mount_opt = old_mount_opt; |
1087 | return err; | 1095 | return err; |
1088 | } | 1096 | } |
1089 | 1097 | ||