aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lock.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2009-11-30 17:34:43 -0500
committerDavid Teigland <teigland@redhat.com>2009-11-30 17:34:43 -0500
commit573c24c4af6664ffcd9aa7ba617a35fde2b95534 (patch)
tree9222c0c8921fda5b842c2d1007d911d47bd4fe7c /fs/dlm/lock.c
parenta8a8a669ea13d792296737505adc43ccacf3a648 (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/lock.c')
-rw-r--r--fs/dlm/lock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index eb507c453c5f..9c0c1db1e105 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -2689,7 +2689,7 @@ static int _create_message(struct dlm_ls *ls, int mb_len,
2689 pass into lowcomms_commit and a message buffer (mb) that we 2689 pass into lowcomms_commit and a message buffer (mb) that we
2690 write our data into */ 2690 write our data into */
2691 2691
2692 mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, ls->ls_allocation, &mb); 2692 mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, GFP_NOFS, &mb);
2693 if (!mh) 2693 if (!mh)
2694 return -ENOBUFS; 2694 return -ENOBUFS;
2695 2695
@@ -4512,7 +4512,7 @@ int dlm_user_request(struct dlm_ls *ls, struct dlm_user_args *ua,
4512 } 4512 }
4513 4513
4514 if (flags & DLM_LKF_VALBLK) { 4514 if (flags & DLM_LKF_VALBLK) {
4515 ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_KERNEL); 4515 ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS);
4516 if (!ua->lksb.sb_lvbptr) { 4516 if (!ua->lksb.sb_lvbptr) {
4517 kfree(ua); 4517 kfree(ua);
4518 __put_lkb(ls, lkb); 4518 __put_lkb(ls, lkb);
@@ -4582,7 +4582,7 @@ int dlm_user_convert(struct dlm_ls *ls, struct dlm_user_args *ua_tmp,
4582 ua = lkb->lkb_ua; 4582 ua = lkb->lkb_ua;
4583 4583
4584 if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) { 4584 if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) {
4585 ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_KERNEL); 4585 ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS);
4586 if (!ua->lksb.sb_lvbptr) { 4586 if (!ua->lksb.sb_lvbptr) {
4587 error = -ENOMEM; 4587 error = -ENOMEM;
4588 goto out_put; 4588 goto out_put;