diff options
author | David Teigland <teigland@redhat.com> | 2009-05-15 17:50:57 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2009-05-15 18:24:59 +0200 |
commit | 748285ccf7ea76d3d76d0d5f2945ad6fb91f5329 (patch) | |
tree | aeb56a0e18c2f54acccb65e5b6e8ac63f53dfc44 /fs/dlm/member.c | |
parent | dlm: connect to nodes earlier (diff) | |
download | linux-748285ccf7ea76d3d76d0d5f2945ad6fb91f5329.tar.xz linux-748285ccf7ea76d3d76d0d5f2945ad6fb91f5329.zip |
dlm: use more NOFS allocation
Change some GFP_KERNEL allocations to use either GFP_NOFS or
ls_allocation (when available) which the fs sets to GFP_NOFS.
The point is to prevent allocations from going back into the
cluster fs in places where that might lead to deadlock.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/member.c')
-rw-r--r-- | fs/dlm/member.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 2afb77051cce..b128775913b2 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -48,7 +48,7 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid) struct dlm_member *memb; int w, error; - memb = kzalloc(sizeof(struct dlm_member), GFP_KERNEL); + memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); if (!memb) return -ENOMEM; @@ -143,7 +143,7 @@ static void make_member_array(struct dlm_ls *ls) ls->ls_total_weight = total; - array = kmalloc(sizeof(int) * total, GFP_KERNEL); + array = kmalloc(sizeof(int) * total, ls->ls_allocation); if (!array) return; @@ -226,7 +226,7 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out) continue; log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); - memb = kzalloc(sizeof(struct dlm_member), GFP_KERNEL); + memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); if (!memb) return -ENOMEM; memb->nodeid = rv->new[i]; @@ -341,7 +341,7 @@ int dlm_ls_start(struct dlm_ls *ls) int *ids = NULL, *new = NULL; int error, ids_count = 0, new_count = 0; - rv = kzalloc(sizeof(struct dlm_recover), GFP_KERNEL); + rv = kzalloc(sizeof(struct dlm_recover), ls->ls_allocation); if (!rv) return -ENOMEM; |