diff options
Diffstat (limited to 'fs/jfs/super.c')
| -rw-r--r-- | fs/jfs/super.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 788e0a9c1fb0..6669aa2042c3 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
| @@ -92,16 +92,20 @@ static void jfs_handle_error(struct super_block *sb) | |||
| 92 | /* nothing is done for continue beyond marking the superblock dirty */ | 92 | /* nothing is done for continue beyond marking the superblock dirty */ |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void jfs_error(struct super_block *sb, const char * function, ...) | 95 | void jfs_error(struct super_block *sb, const char *fmt, ...) |
| 96 | { | 96 | { |
| 97 | static char error_buf[256]; | 97 | struct va_format vaf; |
| 98 | va_list args; | 98 | va_list args; |
| 99 | 99 | ||
| 100 | va_start(args, function); | 100 | va_start(args, fmt); |
| 101 | vsnprintf(error_buf, sizeof(error_buf), function, args); | 101 | |
| 102 | va_end(args); | 102 | vaf.fmt = fmt; |
| 103 | vaf.va = &args; | ||
| 103 | 104 | ||
| 104 | pr_err("ERROR: (device %s): %s\n", sb->s_id, error_buf); | 105 | pr_err("ERROR: (device %s): %pf: %pV\n", |
| 106 | sb->s_id, __builtin_return_address(0), &vaf); | ||
| 107 | |||
| 108 | va_end(args); | ||
| 105 | 109 | ||
| 106 | jfs_handle_error(sb); | 110 | jfs_handle_error(sb); |
| 107 | } | 111 | } |
| @@ -617,7 +621,7 @@ static int jfs_freeze(struct super_block *sb) | |||
| 617 | txQuiesce(sb); | 621 | txQuiesce(sb); |
| 618 | rc = lmLogShutdown(log); | 622 | rc = lmLogShutdown(log); |
| 619 | if (rc) { | 623 | if (rc) { |
| 620 | jfs_error(sb, "jfs_freeze: lmLogShutdown failed"); | 624 | jfs_error(sb, "lmLogShutdown failed\n"); |
| 621 | 625 | ||
| 622 | /* let operations fail rather than hang */ | 626 | /* let operations fail rather than hang */ |
| 623 | txResume(sb); | 627 | txResume(sb); |
| @@ -646,12 +650,12 @@ static int jfs_unfreeze(struct super_block *sb) | |||
| 646 | if (!(sb->s_flags & MS_RDONLY)) { | 650 | if (!(sb->s_flags & MS_RDONLY)) { |
| 647 | rc = updateSuper(sb, FM_MOUNT); | 651 | rc = updateSuper(sb, FM_MOUNT); |
| 648 | if (rc) { | 652 | if (rc) { |
| 649 | jfs_error(sb, "jfs_unfreeze: updateSuper failed"); | 653 | jfs_error(sb, "updateSuper failed\n"); |
| 650 | goto out; | 654 | goto out; |
| 651 | } | 655 | } |
| 652 | rc = lmLogInit(log); | 656 | rc = lmLogInit(log); |
| 653 | if (rc) | 657 | if (rc) |
| 654 | jfs_error(sb, "jfs_unfreeze: lmLogInit failed"); | 658 | jfs_error(sb, "lmLogInit failed\n"); |
| 655 | out: | 659 | out: |
| 656 | txResume(sb); | 660 | txResume(sb); |
| 657 | } | 661 | } |
