diff options
author | Josef Bacik <jbacik@redhat.com> | 2008-03-19 20:00:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-19 21:53:36 -0400 |
commit | c587f0c0a69227587baaa12e75815b6644457c0a (patch) | |
tree | 5ef93bd6d73fdab6084de20988b8934dbc10ae08 /fs/ext3/resize.c | |
parent | ffda6857c87fbe3ab144ff3f34b89421eed048cf (diff) |
ext3: fix wrong gfp type under transaction
There are several places where we make allocations with GFP_KERNEL while under
a transaction, which could lead to an assertion panic or lockup if under
memory pressure. This patch switches these problem areas to use GFP_NOFS to
keep these problems from happening.
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3/resize.c')
-rw-r--r-- | fs/ext3/resize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 9397d779c43d..0e97b6e07cb0 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c | |||
@@ -485,7 +485,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
485 | goto exit_dindj; | 485 | goto exit_dindj; |
486 | 486 | ||
487 | n_group_desc = kmalloc((gdb_num + 1) * sizeof(struct buffer_head *), | 487 | n_group_desc = kmalloc((gdb_num + 1) * sizeof(struct buffer_head *), |
488 | GFP_KERNEL); | 488 | GFP_NOFS); |
489 | if (!n_group_desc) { | 489 | if (!n_group_desc) { |
490 | err = -ENOMEM; | 490 | err = -ENOMEM; |
491 | ext3_warning (sb, __FUNCTION__, | 491 | ext3_warning (sb, __FUNCTION__, |
@@ -568,7 +568,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, | |||
568 | int res, i; | 568 | int res, i; |
569 | int err; | 569 | int err; |
570 | 570 | ||
571 | primary = kmalloc(reserved_gdb * sizeof(*primary), GFP_KERNEL); | 571 | primary = kmalloc(reserved_gdb * sizeof(*primary), GFP_NOFS); |
572 | if (!primary) | 572 | if (!primary) |
573 | return -ENOMEM; | 573 | return -ENOMEM; |
574 | 574 | ||