diff options
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 42e4a303b67..8e8b675ac20 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -1120,8 +1120,8 @@ static void ext2_clear_super_error(struct super_block *sb) | |||
1120 | * be remapped. Nothing we can do but to retry the | 1120 | * be remapped. Nothing we can do but to retry the |
1121 | * write and hope for the best. | 1121 | * write and hope for the best. |
1122 | */ | 1122 | */ |
1123 | printk(KERN_ERR "EXT2-fs: %s previous I/O error to " | 1123 | ext2_msg(sb, KERN_ERR, |
1124 | "superblock detected", sb->s_id); | 1124 | "previous I/O error to superblock detected\n"); |
1125 | clear_buffer_write_io_error(sbh); | 1125 | clear_buffer_write_io_error(sbh); |
1126 | set_buffer_uptodate(sbh); | 1126 | set_buffer_uptodate(sbh); |
1127 | } | 1127 | } |
@@ -1161,23 +1161,9 @@ static void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es) | |||
1161 | static int ext2_sync_fs(struct super_block *sb, int wait) | 1161 | static int ext2_sync_fs(struct super_block *sb, int wait) |
1162 | { | 1162 | { |
1163 | struct ext2_super_block *es = EXT2_SB(sb)->s_es; | 1163 | struct ext2_super_block *es = EXT2_SB(sb)->s_es; |
1164 | struct buffer_head *sbh = EXT2_SB(sb)->s_sbh; | ||
1165 | 1164 | ||
1166 | lock_kernel(); | 1165 | lock_kernel(); |
1167 | if (buffer_write_io_error(sbh)) { | 1166 | ext2_clear_super_error(sb); |
1168 | /* | ||
1169 | * Oh, dear. A previous attempt to write the | ||
1170 | * superblock failed. This could happen because the | ||
1171 | * USB device was yanked out. Or it could happen to | ||
1172 | * be a transient write error and maybe the block will | ||
1173 | * be remapped. Nothing we can do but to retry the | ||
1174 | * write and hope for the best. | ||
1175 | */ | ||
1176 | ext2_msg(sb, KERN_ERR, | ||
1177 | "previous I/O error to superblock detected\n"); | ||
1178 | clear_buffer_write_io_error(sbh); | ||
1179 | set_buffer_uptodate(sbh); | ||
1180 | } | ||
1181 | 1167 | ||
1182 | if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) { | 1168 | if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) { |
1183 | ext2_debug("setting valid to 0\n"); | 1169 | ext2_debug("setting valid to 0\n"); |