Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146363
b: refs/heads/master
c: 7234ab2
h: refs/heads/master
i:
  146361: 3f2399e
  146359: bc216a1
v: v3
  • Loading branch information
Theodore Ts'o committed May 1, 2009
1 parent d897fbd commit 84918b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2d670523c6c4ccb0fca9f3ab1b8f066d9aa57d6
refs/heads/master: 7234ab2a55e77784b44cf2d862136d9e41b8d98a
14 changes: 3 additions & 11 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -3128,7 +3128,6 @@ static int ext4_load_journal(struct super_block *sb,
if (journal_devnum &&
journal_devnum != le32_to_cpu(es->s_journal_dev)) {
es->s_journal_dev = cpu_to_le32(journal_devnum);
sb->s_dirt = 1;

/* Make sure we flush the recovery flag to disk. */
ext4_commit_super(sb, 1);
Expand Down Expand Up @@ -3168,7 +3167,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
&EXT4_SB(sb)->s_freeblocks_counter));
es->s_free_inodes_count = cpu_to_le32(percpu_counter_sum_positive(
&EXT4_SB(sb)->s_freeinodes_counter));

sb->s_dirt = 0;
BUFFER_TRACE(sbh, "marking dirty");
mark_buffer_dirty(sbh);
if (sync) {
Expand Down Expand Up @@ -3210,7 +3209,6 @@ static void ext4_mark_recovery_complete(struct super_block *sb,
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER) &&
sb->s_flags & MS_RDONLY) {
EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
sb->s_dirt = 0;
ext4_commit_super(sb, 1);
}
unlock_super(sb);
Expand Down Expand Up @@ -3271,26 +3269,22 @@ int ext4_force_commit(struct super_block *sb)
return 0;

journal = EXT4_SB(sb)->s_journal;
if (journal) {
sb->s_dirt = 0;
if (journal)
ret = ext4_journal_force_commit(journal);
}

return ret;
}

/*
* Ext4 always journals updates to the superblock itself, so we don't
* have to propagate any other updates to the superblock on disk at this
* point. (We can probably nuke this function altogether, and remove
* any mention to sb->s_dirt in all of fs/ext4; eventual cleanup...)
* point if the journalling is enabled.
*/
static void ext4_write_super(struct super_block *sb)
{
if (EXT4_SB(sb)->s_journal) {
if (mutex_trylock(&sb->s_lock) != 0)
BUG();
sb->s_dirt = 0;
} else {
ext4_commit_super(sb, 1);
}
Expand All @@ -3302,7 +3296,6 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
tid_t target;

trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait);
sb->s_dirt = 0;
if (EXT4_SB(sb)->s_journal) {
if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal,
&target)) {
Expand All @@ -3324,7 +3317,6 @@ static int ext4_freeze(struct super_block *sb)
{
int error = 0;
journal_t *journal;
sb->s_dirt = 0;

if (!(sb->s_flags & MS_RDONLY)) {
journal = EXT4_SB(sb)->s_journal;
Expand Down

0 comments on commit 84918b0

Please sign in to comment.