aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/super.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 976f6aac102e..e0ea1278377a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -141,8 +141,6 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
141 struct super_block *sb = fs_info->sb; 141 struct super_block *sb = fs_info->sb;
142 char nbuf[16]; 142 char nbuf[16];
143 const char *errstr; 143 const char *errstr;
144 va_list args;
145 va_start(args, fmt);
146 144
147 /* 145 /*
148 * Special case: if the error is EROFS, and we're already 146 * Special case: if the error is EROFS, and we're already
@@ -153,13 +151,16 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
153 151
154 errstr = btrfs_decode_error(errno, nbuf); 152 errstr = btrfs_decode_error(errno, nbuf);
155 if (fmt) { 153 if (fmt) {
156 struct va_format vaf = { 154 struct va_format vaf;
157 .fmt = fmt, 155 va_list args;
158 .va = &args, 156
159 }; 157 va_start(args, fmt);
158 vaf.fmt = fmt;
159 vaf.va = &args;
160 160
161 printk(KERN_CRIT "BTRFS error (device %s) in %s:%d: %s (%pV)\n", 161 printk(KERN_CRIT "BTRFS error (device %s) in %s:%d: %s (%pV)\n",
162 sb->s_id, function, line, errstr, &vaf); 162 sb->s_id, function, line, errstr, &vaf);
163 va_end(args);
163 } else { 164 } else {
164 printk(KERN_CRIT "BTRFS error (device %s) in %s:%d: %s\n", 165 printk(KERN_CRIT "BTRFS error (device %s) in %s:%d: %s\n",
165 sb->s_id, function, line, errstr); 166 sb->s_id, function, line, errstr);
@@ -170,7 +171,6 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
170 save_error_info(fs_info); 171 save_error_info(fs_info);
171 btrfs_handle_error(fs_info); 172 btrfs_handle_error(fs_info);
172 } 173 }
173 va_end(args);
174} 174}
175 175
176static const char * const logtypes[] = { 176static const char * const logtypes[] = {