diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch new file mode 100644 index 00000000..2c66b9a8 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 6556e20032c10ba45a6101a9454265c0f8c0fbc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Shaohua Li <shli@kernel.org> | ||
3 | Date: Fri, 13 Apr 2012 10:27:35 +0800 | ||
4 | Subject: [PATCH 024/165] jbd2: use GFP_NOFS for blkdev_issue_flush | ||
5 | |||
6 | commit 99aa78466777083255b876293e9e83dec7cd809a upstream. | ||
7 | |||
8 | flush request is issued in transaction commit code path, so looks using | ||
9 | GFP_KERNEL to allocate memory for flush request bio falls into the classic | ||
10 | deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are | ||
11 | using GFP. | ||
12 | |||
13 | Signed-off-by: Shaohua Li <shli@fusionio.com> | ||
14 | Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ||
15 | Reviewed-by: Jan Kara <jack@suse.cz> | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | fs/jbd2/commit.c | 4 ++-- | ||
19 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c | ||
22 | index 68d704d..d751f04 100644 | ||
23 | --- a/fs/jbd2/commit.c | ||
24 | +++ b/fs/jbd2/commit.c | ||
25 | @@ -683,7 +683,7 @@ start_journal_io: | ||
26 | if (commit_transaction->t_need_data_flush && | ||
27 | (journal->j_fs_dev != journal->j_dev) && | ||
28 | (journal->j_flags & JBD2_BARRIER)) | ||
29 | - blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); | ||
30 | + blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL); | ||
31 | |||
32 | /* Done it all: now write the commit record asynchronously. */ | ||
33 | if (JBD2_HAS_INCOMPAT_FEATURE(journal, | ||
34 | @@ -819,7 +819,7 @@ wait_for_iobuf: | ||
35 | if (JBD2_HAS_INCOMPAT_FEATURE(journal, | ||
36 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && | ||
37 | journal->j_flags & JBD2_BARRIER) { | ||
38 | - blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL); | ||
39 | + blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL); | ||
40 | } | ||
41 | |||
42 | if (err) | ||
43 | -- | ||
44 | 1.7.7.6 | ||
45 | |||