diff options
author | Michal Marek <mmarek@suse.cz> | 2010-08-04 07:59:13 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-08-04 07:59:13 -0400 |
commit | 772320e84588dcbe1600ffb83e5f328f2209ac2a (patch) | |
tree | a7de21b79340aeaa17c58126f6b801b82c77b53a /fs/jbd2/commit.c | |
parent | 1ce53adf13a54375d2a5c7cdbe341b2558389615 (diff) | |
parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) |
Merge commit 'v2.6.35' into kbuild/kbuild
Conflicts:
arch/powerpc/Makefile
Diffstat (limited to 'fs/jbd2/commit.c')
-rw-r--r-- | fs/jbd2/commit.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 1bc74b6f26d2..75716d3d2be0 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
@@ -717,7 +717,8 @@ start_journal_io: | |||
717 | if (commit_transaction->t_flushed_data_blocks && | 717 | if (commit_transaction->t_flushed_data_blocks && |
718 | (journal->j_fs_dev != journal->j_dev) && | 718 | (journal->j_fs_dev != journal->j_dev) && |
719 | (journal->j_flags & JBD2_BARRIER)) | 719 | (journal->j_flags & JBD2_BARRIER)) |
720 | blkdev_issue_flush(journal->j_fs_dev, NULL); | 720 | blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL, |
721 | BLKDEV_IFL_WAIT); | ||
721 | 722 | ||
722 | /* Done it all: now write the commit record asynchronously. */ | 723 | /* Done it all: now write the commit record asynchronously. */ |
723 | if (JBD2_HAS_INCOMPAT_FEATURE(journal, | 724 | if (JBD2_HAS_INCOMPAT_FEATURE(journal, |
@@ -727,7 +728,8 @@ start_journal_io: | |||
727 | if (err) | 728 | if (err) |
728 | __jbd2_journal_abort_hard(journal); | 729 | __jbd2_journal_abort_hard(journal); |
729 | if (journal->j_flags & JBD2_BARRIER) | 730 | if (journal->j_flags & JBD2_BARRIER) |
730 | blkdev_issue_flush(journal->j_dev, NULL); | 731 | blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL, |
732 | BLKDEV_IFL_WAIT); | ||
731 | } | 733 | } |
732 | 734 | ||
733 | err = journal_finish_inode_data_buffers(journal, commit_transaction); | 735 | err = journal_finish_inode_data_buffers(journal, commit_transaction); |
@@ -883,8 +885,7 @@ restart_loop: | |||
883 | spin_unlock(&journal->j_list_lock); | 885 | spin_unlock(&journal->j_list_lock); |
884 | bh = jh2bh(jh); | 886 | bh = jh2bh(jh); |
885 | jbd_lock_bh_state(bh); | 887 | jbd_lock_bh_state(bh); |
886 | J_ASSERT_JH(jh, jh->b_transaction == commit_transaction || | 888 | J_ASSERT_JH(jh, jh->b_transaction == commit_transaction); |
887 | jh->b_transaction == journal->j_running_transaction); | ||
888 | 889 | ||
889 | /* | 890 | /* |
890 | * If there is undo-protected committed data against | 891 | * If there is undo-protected committed data against |
@@ -930,12 +931,12 @@ restart_loop: | |||
930 | /* A buffer which has been freed while still being | 931 | /* A buffer which has been freed while still being |
931 | * journaled by a previous transaction may end up still | 932 | * journaled by a previous transaction may end up still |
932 | * being dirty here, but we want to avoid writing back | 933 | * being dirty here, but we want to avoid writing back |
933 | * that buffer in the future now that the last use has | 934 | * that buffer in the future after the "add to orphan" |
934 | * been committed. That's not only a performance gain, | 935 | * operation been committed, That's not only a performance |
935 | * it also stops aliasing problems if the buffer is left | 936 | * gain, it also stops aliasing problems if the buffer is |
936 | * behind for writeback and gets reallocated for another | 937 | * left behind for writeback and gets reallocated for another |
937 | * use in a different page. */ | 938 | * use in a different page. */ |
938 | if (buffer_freed(bh)) { | 939 | if (buffer_freed(bh) && !jh->b_next_transaction) { |
939 | clear_buffer_freed(bh); | 940 | clear_buffer_freed(bh); |
940 | clear_buffer_jbddirty(bh); | 941 | clear_buffer_jbddirty(bh); |
941 | } | 942 | } |