aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/acl.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-04-09 09:33:41 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-04-10 04:55:26 -0400
commit16c5f06f15ad4e5a5d6e90b78ffb1ac14319e445 (patch)
tree84204e44e0246e9a3f4db23223a5209105fde368 /fs/gfs2/acl.c
parent773adff8e983cba1f5844c3be3be224ca6645f26 (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/acl.c')
-rw-r--r--fs/gfs2/acl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 1047a8c7226a..3e9bd46f27e3 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -116,7 +116,7 @@ static int acl_get(struct gfs2_inode *ip, int access, struct posix_acl **acl,
116 goto out; 116 goto out;
117 117
118 er.er_data_len = GFS2_EA_DATA_LEN(el->el_ea); 118 er.er_data_len = GFS2_EA_DATA_LEN(el->el_ea);
119 er.er_data = kmalloc(er.er_data_len, GFP_KERNEL); 119 er.er_data = kmalloc(er.er_data_len, GFP_NOFS);
120 error = -ENOMEM; 120 error = -ENOMEM;
121 if (!er.er_data) 121 if (!er.er_data)
122 goto out; 122 goto out;
@@ -222,7 +222,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct gfs2_inode *ip)
222 return error; 222 return error;
223 } 223 }
224 224
225 clone = posix_acl_clone(acl, GFP_KERNEL); 225 clone = posix_acl_clone(acl, GFP_NOFS);
226 error = -ENOMEM; 226 error = -ENOMEM;
227 if (!clone) 227 if (!clone)
228 goto out; 228 goto out;
@@ -272,7 +272,7 @@ int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr)
272 if (!acl) 272 if (!acl)
273 return gfs2_setattr_simple(ip, attr); 273 return gfs2_setattr_simple(ip, attr);
274 274
275 clone = posix_acl_clone(acl, GFP_KERNEL); 275 clone = posix_acl_clone(acl, GFP_NOFS);
276 error = -ENOMEM; 276 error = -ENOMEM;
277 if (!clone) 277 if (!clone)
278 goto out; 278 goto out;