summaryrefslogtreecommitdiffstats
path: root/fs/ext3/xattr.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-03-19 17:00:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 18:53:36 -0700
commitc587f0c0a69227587baaa12e75815b6644457c0a (patch)
tree5ef93bd6d73fdab6084de20988b8934dbc10ae08 /fs/ext3/xattr.c
parentffda6857c87fbe3ab144ff3f34b89421eed048cf (diff)
downloadop-kernel-dev-c587f0c0a69227587baaa12e75815b6644457c0a.zip
op-kernel-dev-c587f0c0a69227587baaa12e75815b6644457c0a.tar.gz
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/xattr.c')
-rw-r--r--fs/ext3/xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c
index fb89c29..a6ea4d6 100644
--- a/fs/ext3/xattr.c
+++ b/fs/ext3/xattr.c
@@ -728,7 +728,7 @@ ext3_xattr_block_set(handle_t *handle, struct inode *inode,
ce = NULL;
}
ea_bdebug(bs->bh, "cloning");
- s->base = kmalloc(bs->bh->b_size, GFP_KERNEL);
+ s->base = kmalloc(bs->bh->b_size, GFP_NOFS);
error = -ENOMEM;
if (s->base == NULL)
goto cleanup;
@@ -740,7 +740,7 @@ ext3_xattr_block_set(handle_t *handle, struct inode *inode,
}
} else {
/* Allocate a buffer where we construct the new block. */
- s->base = kzalloc(sb->s_blocksize, GFP_KERNEL);
+ s->base = kzalloc(sb->s_blocksize, GFP_NOFS);
/* assert(header == s->base) */
error = -ENOMEM;
if (s->base == NULL)
OpenPOWER on IntegriCloud