diff options
author | David Teigland <teigland@redhat.com> | 2009-11-30 17:34:43 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2009-11-30 17:34:43 -0500 |
commit | 573c24c4af6664ffcd9aa7ba617a35fde2b95534 (patch) | |
tree | 9222c0c8921fda5b842c2d1007d911d47bd4fe7c /fs/dlm/member.c | |
parent | a8a8a669ea13d792296737505adc43ccacf3a648 (diff) |
dlm: always use GFP_NOFS
Replace all GFP_KERNEL and ls_allocation with GFP_NOFS.
ls_allocation would be GFP_KERNEL for userland lockspaces
and GFP_NOFS for file system lockspaces.
It was discovered that any lockspaces on the system can
affect all others by triggering memory reclaim in the
file system which could in turn call back into the dlm
to acquire locks, deadlocking dlm threads that were
shared by all lockspaces, like dlm_recv.
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 b128775913b2..84f70bfb0baf 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) | |||
48 | struct dlm_member *memb; | 48 | struct dlm_member *memb; |
49 | int w, error; | 49 | int w, error; |
50 | 50 | ||
51 | memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); | 51 | memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS); |
52 | if (!memb) | 52 | if (!memb) |
53 | return -ENOMEM; | 53 | return -ENOMEM; |
54 | 54 | ||
@@ -143,7 +143,7 @@ static void make_member_array(struct dlm_ls *ls) | |||
143 | 143 | ||
144 | ls->ls_total_weight = total; | 144 | ls->ls_total_weight = total; |
145 | 145 | ||
146 | array = kmalloc(sizeof(int) * total, ls->ls_allocation); | 146 | array = kmalloc(sizeof(int) * total, GFP_NOFS); |
147 | if (!array) | 147 | if (!array) |
148 | return; | 148 | return; |
149 | 149 | ||
@@ -226,7 +226,7 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out) | |||
226 | continue; | 226 | continue; |
227 | log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); | 227 | log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); |
228 | 228 | ||
229 | memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); | 229 | memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS); |
230 | if (!memb) | 230 | if (!memb) |
231 | return -ENOMEM; | 231 | return -ENOMEM; |
232 | memb->nodeid = rv->new[i]; | 232 | memb->nodeid = rv->new[i]; |
@@ -341,7 +341,7 @@ int dlm_ls_start(struct dlm_ls *ls) | |||
341 | int *ids = NULL, *new = NULL; | 341 | int *ids = NULL, *new = NULL; |
342 | int error, ids_count = 0, new_count = 0; | 342 | int error, ids_count = 0, new_count = 0; |
343 | 343 | ||
344 | rv = kzalloc(sizeof(struct dlm_recover), ls->ls_allocation); | 344 | rv = kzalloc(sizeof(struct dlm_recover), GFP_NOFS); |
345 | if (!rv) | 345 | if (!rv) |
346 | return -ENOMEM; | 346 | return -ENOMEM; |
347 | 347 | ||