aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-07 01:43:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-07 01:43:03 -0500
commit9eeda9abd1faf489f3df9a1f557975f4c8650363 (patch)
tree3e0a58e25b776cfbee193195460324dccb1886c7 /fs/ext3
parent61c9eaf90081cbe6dc4f389e0056bff76eca19ec (diff)
parent4bab0ea1d42dd1927af9df6fbf0003fc00617c50 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/ath5k/base.c net/8021q/vlan_core.c
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/super.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 18eaa78ecb4e..5dec6d1356c4 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -281,7 +281,8 @@ void ext3_abort (struct super_block * sb, const char * function,
281 EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS; 281 EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS;
282 sb->s_flags |= MS_RDONLY; 282 sb->s_flags |= MS_RDONLY;
283 EXT3_SB(sb)->s_mount_opt |= EXT3_MOUNT_ABORT; 283 EXT3_SB(sb)->s_mount_opt |= EXT3_MOUNT_ABORT;
284 journal_abort(EXT3_SB(sb)->s_journal, -EIO); 284 if (EXT3_SB(sb)->s_journal)
285 journal_abort(EXT3_SB(sb)->s_journal, -EIO);
285} 286}
286 287
287void ext3_warning (struct super_block * sb, const char * function, 288void ext3_warning (struct super_block * sb, const char * function,
@@ -390,11 +391,14 @@ static void ext3_put_super (struct super_block * sb)
390{ 391{
391 struct ext3_sb_info *sbi = EXT3_SB(sb); 392 struct ext3_sb_info *sbi = EXT3_SB(sb);
392 struct ext3_super_block *es = sbi->s_es; 393 struct ext3_super_block *es = sbi->s_es;
393 int i; 394 int i, err;
394 395
395 ext3_xattr_put_super(sb); 396 ext3_xattr_put_super(sb);
396 if (journal_destroy(sbi->s_journal) < 0) 397 err = journal_destroy(sbi->s_journal);
398 sbi->s_journal = NULL;
399 if (err < 0)
397 ext3_abort(sb, __func__, "Couldn't clean up the journal"); 400 ext3_abort(sb, __func__, "Couldn't clean up the journal");
401
398 if (!(sb->s_flags & MS_RDONLY)) { 402 if (!(sb->s_flags & MS_RDONLY)) {
399 EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER); 403 EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER);
400 es->s_state = cpu_to_le16(sbi->s_mount_state); 404 es->s_state = cpu_to_le16(sbi->s_mount_state);
@@ -2386,13 +2390,12 @@ static void ext3_write_super (struct super_block * sb)
2386 2390
2387static int ext3_sync_fs(struct super_block *sb, int wait) 2391static int ext3_sync_fs(struct super_block *sb, int wait)
2388{ 2392{
2389 tid_t target;
2390
2391 sb->s_dirt = 0; 2393 sb->s_dirt = 0;
2392 if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { 2394 if (wait)
2393 if (wait) 2395 ext3_force_commit(sb);
2394 log_wait_commit(EXT3_SB(sb)->s_journal, target); 2396 else
2395 } 2397 journal_start_commit(EXT3_SB(sb)->s_journal, NULL);
2398
2396 return 0; 2399 return 0;
2397} 2400}
2398 2401