1 ext4: avoid deadlocks in the writeback path by using sb_getblk_gfp
3 From: Nikolay Borisov <kernel@kyup.com>
5 Switch ext4 to using sb_getblk_gfp with GFP_NOFS added to fix possible
6 deadlocks in the page writeback path.
8 Signed-off-by: Nikolay Borisov <kernel@kyup.com>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
10 Cc: stable@vger.kernel.org
12 fs/ext4/extents.c | 6 +++---
13 1 files changed, 3 insertions(+), 3 deletions(-)
15 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
16 index e003a1e..87ba10d 100644
17 --- a/fs/ext4/extents.c
18 +++ b/fs/ext4/extents.c
19 @@ -503,7 +503,7 @@ __read_extent_tree_block(const char *function, unsigned int line,
20 struct buffer_head *bh;
23 - bh = sb_getblk(inode->i_sb, pblk);
24 + bh = sb_getblk_gfp(inode->i_sb, pblk, __GFP_MOVABLE | GFP_NOFS);
26 return ERR_PTR(-ENOMEM);
28 @@ -1088,7 +1088,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
32 - bh = sb_getblk(inode->i_sb, newblock);
33 + bh = sb_getblk_gfp(inode->i_sb, newblock, __GFP_MOVABLE | GFP_NOFS);
37 @@ -1282,7 +1282,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
41 - bh = sb_getblk(inode->i_sb, newblock);
42 + bh = sb_getblk_gfp(inode->i_sb, newblock, __GFP_MOVABLE | GFP_NOFS);
50 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
51 the body of a message to majordomo@vger.kernel.org
52 More majordomo info at http://vger.kernel.org/majordomo-info.html