diff options
author | Josef Bacik <jbacik@redhat.com> | 2008-04-09 09:33:41 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-04-10 04:55:26 -0400 |
commit | 16c5f06f15ad4e5a5d6e90b78ffb1ac14319e445 (patch) | |
tree | 84204e44e0246e9a3f4db23223a5209105fde368 /fs/gfs2/eattr.c | |
parent | 773adff8e983cba1f5844c3be3be224ca6645f26 (diff) |
[GFS2] fix GFP_KERNEL misuses
There are several places where GFP_KERNEL allocations happen under a glock,
which will result in hangs if we're under memory pressure and go to re-enter the
fs in order to flush stuff out. This patch changes the culprits to GFS_NOFS to
keep this problem from happening. Thank you,
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/eattr.c')
-rw-r--r-- | fs/gfs2/eattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 81755925a755..e3f76f451b0a 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c | |||
@@ -448,7 +448,7 @@ static int ea_get_unstuffed(struct gfs2_inode *ip, struct gfs2_ea_header *ea, | |||
448 | unsigned int x; | 448 | unsigned int x; |
449 | int error = 0; | 449 | int error = 0; |
450 | 450 | ||
451 | bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_KERNEL); | 451 | bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_NOFS); |
452 | if (!bh) | 452 | if (!bh) |
453 | return -ENOMEM; | 453 | return -ENOMEM; |
454 | 454 | ||
@@ -1206,7 +1206,7 @@ static int ea_acl_chmod_unstuffed(struct gfs2_inode *ip, | |||
1206 | unsigned int x; | 1206 | unsigned int x; |
1207 | int error; | 1207 | int error; |
1208 | 1208 | ||
1209 | bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_KERNEL); | 1209 | bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_NOFS); |
1210 | if (!bh) | 1210 | if (!bh) |
1211 | return -ENOMEM; | 1211 | return -ENOMEM; |
1212 | 1212 | ||