aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2012-04-12 22:27:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-27 12:51:07 -0400
commit7604ff9ce747b74ddff6ac5d118a442122fdcbd7 (patch)
treef6b2123f31dc3478fd54b668d55e23b200fffdbd /fs/jbd2/commit.c
parent56bd028ddf6c29e44b87ce0bd79754fe944d1850 (diff)
jbd2: use GFP_NOFS for blkdev_issue_flush
commit 99aa78466777083255b876293e9e83dec7cd809a upstream. flush request is issued in transaction commit code path, so looks using GFP_KERNEL to allocate memory for flush request bio falls into the classic deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are using GFP. Signed-off-by: Shaohua Li <shli@fusionio.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jbd2/commit.c')
-rw-r--r--fs/jbd2/commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index eef6979821a..36c2e800e73 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -683,7 +683,7 @@ start_journal_io:
683 if (commit_transaction->t_need_data_flush && 683 if (commit_transaction->t_need_data_flush &&
684 (journal->j_fs_dev != journal->j_dev) && 684 (journal->j_fs_dev != journal->j_dev) &&
685 (journal->j_flags & JBD2_BARRIER)) 685 (journal->j_flags & JBD2_BARRIER))
686 blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); 686 blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL);
687 687
688 /* Done it all: now write the commit record asynchronously. */ 688 /* Done it all: now write the commit record asynchronously. */
689 if (JBD2_HAS_INCOMPAT_FEATURE(journal, 689 if (JBD2_HAS_INCOMPAT_FEATURE(journal,
@@ -819,7 +819,7 @@ wait_for_iobuf:
819 if (JBD2_HAS_INCOMPAT_FEATURE(journal, 819 if (JBD2_HAS_INCOMPAT_FEATURE(journal,
820 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && 820 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) &&
821 journal->j_flags & JBD2_BARRIER) { 821 journal->j_flags & JBD2_BARRIER) {
822 blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL); 822 blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL);
823 } 823 }
824 824
825 if (err) 825 if (err)