diff options
-rw-r--r-- | fs/ufs/super.c | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index ca2455748ef5..206f7d6f1ed0 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -286,13 +286,12 @@ static void ufs_print_cylinder_stuff(struct super_block *sb, | |||
286 | 286 | ||
287 | static const struct super_operations ufs_super_ops; | 287 | static const struct super_operations ufs_super_ops; |
288 | 288 | ||
289 | static char error_buf[1024]; | ||
290 | |||
291 | void ufs_error (struct super_block * sb, const char * function, | 289 | void ufs_error (struct super_block * sb, const char * function, |
292 | const char * fmt, ...) | 290 | const char * fmt, ...) |
293 | { | 291 | { |
294 | struct ufs_sb_private_info * uspi; | 292 | struct ufs_sb_private_info * uspi; |
295 | struct ufs_super_block_first * usb1; | 293 | struct ufs_super_block_first * usb1; |
294 | struct va_format vaf; | ||
296 | va_list args; | 295 | va_list args; |
297 | 296 | ||
298 | uspi = UFS_SB(sb)->s_uspi; | 297 | uspi = UFS_SB(sb)->s_uspi; |
@@ -304,20 +303,21 @@ void ufs_error (struct super_block * sb, const char * function, | |||
304 | ufs_mark_sb_dirty(sb); | 303 | ufs_mark_sb_dirty(sb); |
305 | sb->s_flags |= MS_RDONLY; | 304 | sb->s_flags |= MS_RDONLY; |
306 | } | 305 | } |
307 | va_start (args, fmt); | 306 | va_start(args, fmt); |
308 | vsnprintf (error_buf, sizeof(error_buf), fmt, args); | 307 | vaf.fmt = fmt; |
309 | va_end (args); | 308 | vaf.va = &args; |
310 | switch (UFS_SB(sb)->s_mount_opt & UFS_MOUNT_ONERROR) { | 309 | switch (UFS_SB(sb)->s_mount_opt & UFS_MOUNT_ONERROR) { |
311 | case UFS_MOUNT_ONERROR_PANIC: | 310 | case UFS_MOUNT_ONERROR_PANIC: |
312 | panic("panic (device %s): %s: %s\n", | 311 | panic("panic (device %s): %s: %pV\n", |
313 | sb->s_id, function, error_buf); | 312 | sb->s_id, function, &vaf); |
314 | 313 | ||
315 | case UFS_MOUNT_ONERROR_LOCK: | 314 | case UFS_MOUNT_ONERROR_LOCK: |
316 | case UFS_MOUNT_ONERROR_UMOUNT: | 315 | case UFS_MOUNT_ONERROR_UMOUNT: |
317 | case UFS_MOUNT_ONERROR_REPAIR: | 316 | case UFS_MOUNT_ONERROR_REPAIR: |
318 | pr_crit("error (device %s): %s: %s\n", | 317 | pr_crit("error (device %s): %s: %pV\n", |
319 | sb->s_id, function, error_buf); | 318 | sb->s_id, function, &vaf); |
320 | } | 319 | } |
320 | va_end(args); | ||
321 | } | 321 | } |
322 | 322 | ||
323 | void ufs_panic (struct super_block * sb, const char * function, | 323 | void ufs_panic (struct super_block * sb, const char * function, |
@@ -325,6 +325,7 @@ void ufs_panic (struct super_block * sb, const char * function, | |||
325 | { | 325 | { |
326 | struct ufs_sb_private_info * uspi; | 326 | struct ufs_sb_private_info * uspi; |
327 | struct ufs_super_block_first * usb1; | 327 | struct ufs_super_block_first * usb1; |
328 | struct va_format vaf; | ||
328 | va_list args; | 329 | va_list args; |
329 | 330 | ||
330 | uspi = UFS_SB(sb)->s_uspi; | 331 | uspi = UFS_SB(sb)->s_uspi; |
@@ -335,24 +336,27 @@ void ufs_panic (struct super_block * sb, const char * function, | |||
335 | ubh_mark_buffer_dirty(USPI_UBH(uspi)); | 336 | ubh_mark_buffer_dirty(USPI_UBH(uspi)); |
336 | ufs_mark_sb_dirty(sb); | 337 | ufs_mark_sb_dirty(sb); |
337 | } | 338 | } |
338 | va_start (args, fmt); | 339 | va_start(args, fmt); |
339 | vsnprintf (error_buf, sizeof(error_buf), fmt, args); | 340 | vaf.fmt = fmt; |
340 | va_end (args); | 341 | vaf.va = &args; |
341 | sb->s_flags |= MS_RDONLY; | 342 | sb->s_flags |= MS_RDONLY; |
342 | pr_crit("panic (device %s): %s: %s\n", | 343 | pr_crit("panic (device %s): %s: %pV\n", |
343 | sb->s_id, function, error_buf); | 344 | sb->s_id, function, &vaf); |
345 | va_end(args); | ||
344 | } | 346 | } |
345 | 347 | ||
346 | void ufs_warning (struct super_block * sb, const char * function, | 348 | void ufs_warning (struct super_block * sb, const char * function, |
347 | const char * fmt, ...) | 349 | const char * fmt, ...) |
348 | { | 350 | { |
351 | struct va_format vaf; | ||
349 | va_list args; | 352 | va_list args; |
350 | 353 | ||
351 | va_start (args, fmt); | 354 | va_start(args, fmt); |
352 | vsnprintf (error_buf, sizeof(error_buf), fmt, args); | 355 | vaf.fmt = fmt; |
353 | va_end (args); | 356 | vaf.va = &args; |
354 | pr_warn("warning (device %s): %s: %s\n", | 357 | pr_warn("(device %s): %s: %pV\n", |
355 | sb->s_id, function, error_buf); | 358 | sb->s_id, function, &vaf); |
359 | va_end(args); | ||
356 | } | 360 | } |
357 | 361 | ||
358 | enum { | 362 | enum { |