Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175298
b: refs/heads/master
c: 2074abf
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jan Kara committed Dec 10, 2009
1 parent 173e0ab commit d813bde
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2314b07cb47ef7d7da5779977f8c3bf1b65748d2
refs/heads/master: 2074abfeb8ea2904aeeaecc45e0dfea3f83a22b2
16 changes: 16 additions & 0 deletions trunk/fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,24 @@ static void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es)
static int ext2_sync_fs(struct super_block *sb, int wait)
{
struct ext2_super_block *es = EXT2_SB(sb)->s_es;
struct buffer_head *sbh = EXT2_SB(sb)->s_sbh;

lock_kernel();
if (buffer_write_io_error(sbh)) {
/*
* Oh, dear. A previous attempt to write the
* superblock failed. This could happen because the
* USB device was yanked out. Or it could happen to
* be a transient write error and maybe the block will
* be remapped. Nothing we can do but to retry the
* write and hope for the best.
*/
ext2_msg(sb, KERN_ERR,
"previous I/O error to superblock detected\n");
clear_buffer_write_io_error(sbh);
set_buffer_uptodate(sbh);
}

if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) {
ext2_debug("setting valid to 0\n");
es->s_state &= cpu_to_le16(~EXT2_VALID_FS);
Expand Down

0 comments on commit d813bde

Please sign in to comment.