diff options
author | Shaohua Li <shli@kernel.org> | 2012-04-13 10:27:35 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 09:51:07 -0700 |
commit | 7604ff9ce747b74ddff6ac5d118a442122fdcbd7 (patch) | |
tree | f6b2123f31dc3478fd54b668d55e23b200fffdbd | |
parent | 56bd028ddf6c29e44b87ce0bd79754fe944d1850 (diff) | |
download | kernel_samsung_smdk4412-7604ff9ce747b74ddff6ac5d118a442122fdcbd7.zip kernel_samsung_smdk4412-7604ff9ce747b74ddff6ac5d118a442122fdcbd7.tar.gz kernel_samsung_smdk4412-7604ff9ce747b74ddff6ac5d118a442122fdcbd7.tar.bz2 |
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>
-rw-r--r-- | fs/jbd2/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index eef6979..36c2e80 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -683,7 +683,7 @@ start_journal_io: if (commit_transaction->t_need_data_flush && (journal->j_fs_dev != journal->j_dev) && (journal->j_flags & JBD2_BARRIER)) - blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); + blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL); /* Done it all: now write the commit record asynchronously. */ if (JBD2_HAS_INCOMPAT_FEATURE(journal, @@ -819,7 +819,7 @@ wait_for_iobuf: if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && journal->j_flags & JBD2_BARRIER) { - blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL); + blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL); } if (err) |