diff options
author | Jan Kara <jack@suse.cz> | 2009-02-11 16:04:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-11 17:25:35 -0500 |
commit | 02ac597c9b86af49b2016aa98aee20ab59dbf0d2 (patch) | |
tree | 7ecf4acd955eabb023dba50c0b4ef67d585eb56e /fs/ext3 | |
parent | 8fe4cd0dc5ea43760c59eb256404188272cc95dd (diff) |
ext3: revert "ext3: wait on all pending commits in ext3_sync_fs"
This reverts commit c87591b719737b4e91eb1a9fa8fd55a4ff1886d6.
Since journal_start_commit() is now fixed to return 1 when we started a
transaction commit, there's some transaction waiting to be committed or
there's a transaction already committing, we don't need to call
ext3_force_commit() in ext3_sync_fs(). Furthermore ext3_force_commit()
can unnecessarily create sync transaction which is expensive so it's
worthwhile to remove it when we can.
Cc: Eric Sandeen <sandeen@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/super.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index b70d90e08a3c..4a970411a458 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2428,12 +2428,13 @@ static void ext3_write_super (struct super_block * sb) | |||
2428 | 2428 | ||
2429 | static int ext3_sync_fs(struct super_block *sb, int wait) | 2429 | static int ext3_sync_fs(struct super_block *sb, int wait) |
2430 | { | 2430 | { |
2431 | sb->s_dirt = 0; | 2431 | tid_t target; |
2432 | if (wait) | ||
2433 | ext3_force_commit(sb); | ||
2434 | else | ||
2435 | journal_start_commit(EXT3_SB(sb)->s_journal, NULL); | ||
2436 | 2432 | ||
2433 | sb->s_dirt = 0; | ||
2434 | if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { | ||
2435 | if (wait) | ||
2436 | log_wait_commit(EXT3_SB(sb)->s_journal, target); | ||
2437 | } | ||
2437 | return 0; | 2438 | return 0; |
2438 | } | 2439 | } |
2439 | 2440 | ||