diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-11-03 09:49:01 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-11-03 09:49:01 -0500 |
commit | e856359685143a2f65876e7db4e4aa0ef5dce7f0 (patch) | |
tree | bbcafe7f23975979f7a2bc6fd1404908d5fd7bd1 /fs/ext4/super.c | |
parent | e3bd9ec5d8bfc90f9e1bd995677829e57a404061 (diff) | |
parent | 45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c-moves2
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index bdddea14e782..994859df010e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -333,7 +333,8 @@ void ext4_abort(struct super_block *sb, const char *function, | |||
333 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; | 333 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; |
334 | sb->s_flags |= MS_RDONLY; | 334 | sb->s_flags |= MS_RDONLY; |
335 | EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; | 335 | EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; |
336 | jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); | 336 | if (EXT4_SB(sb)->s_journal) |
337 | jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); | ||
337 | } | 338 | } |
338 | 339 | ||
339 | void ext4_warning(struct super_block *sb, const char *function, | 340 | void ext4_warning(struct super_block *sb, const char *function, |
@@ -442,14 +443,16 @@ static void ext4_put_super(struct super_block *sb) | |||
442 | { | 443 | { |
443 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 444 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
444 | struct ext4_super_block *es = sbi->s_es; | 445 | struct ext4_super_block *es = sbi->s_es; |
445 | int i; | 446 | int i, err; |
446 | 447 | ||
447 | ext4_mb_release(sb); | 448 | ext4_mb_release(sb); |
448 | ext4_ext_release(sb); | 449 | ext4_ext_release(sb); |
449 | ext4_xattr_put_super(sb); | 450 | ext4_xattr_put_super(sb); |
450 | if (jbd2_journal_destroy(sbi->s_journal) < 0) | 451 | err = jbd2_journal_destroy(sbi->s_journal); |
451 | ext4_abort(sb, __func__, "Couldn't clean up the journal"); | ||
452 | sbi->s_journal = NULL; | 452 | sbi->s_journal = NULL; |
453 | if (err < 0) | ||
454 | ext4_abort(sb, __func__, "Couldn't clean up the journal"); | ||
455 | |||
453 | if (!(sb->s_flags & MS_RDONLY)) { | 456 | if (!(sb->s_flags & MS_RDONLY)) { |
454 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); | 457 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); |
455 | es->s_state = cpu_to_le16(sbi->s_mount_state); | 458 | es->s_state = cpu_to_le16(sbi->s_mount_state); |