aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2012-04-12 22:27:35 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-04-23 21:43:41 -0400
commit99aa78466777083255b876293e9e83dec7cd809a (patch)
treee15bd88760cb27bb306929b19ba41abc53e0e333 /fs/jbd2/commit.c
parent57f73c2c89a5d3b2ed87201c8100d1fa989a1a65 (diff)
jbd2: use GFP_NOFS for blkdev_issue_flush
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> Cc: stable@vger.kernel.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 806525a7269c..840f70f50792 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -723,7 +723,7 @@ start_journal_io:
723 if (commit_transaction->t_need_data_flush && 723 if (commit_transaction->t_need_data_flush &&
724 (journal->j_fs_dev != journal->j_dev) && 724 (journal->j_fs_dev != journal->j_dev) &&
725 (journal->j_flags & JBD2_BARRIER)) 725 (journal->j_flags & JBD2_BARRIER))
726 blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); 726 blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL);
727 727
728 /* Done it all: now write the commit record asynchronously. */ 728 /* Done it all: now write the commit record asynchronously. */
729 if (JBD2_HAS_INCOMPAT_FEATURE(journal, 729 if (JBD2_HAS_INCOMPAT_FEATURE(journal,
@@ -859,7 +859,7 @@ wait_for_iobuf:
859 if (JBD2_HAS_INCOMPAT_FEATURE(journal, 859 if (JBD2_HAS_INCOMPAT_FEATURE(journal,
860 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && 860 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) &&
861 journal->j_flags & JBD2_BARRIER) { 861 journal->j_flags & JBD2_BARRIER) {
862 blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL); 862 blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL);
863 } 863 }
864 864
865 if (err) 865 if (err)