aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lowcomms.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/lowcomms.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/lowcomms.c')
-rw-r--r--fs/dlm/lowcomms.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 70736eb4b516..52cab160893c 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1060,7 +1060,7 @@ static void init_local(void)
1060 if (dlm_our_addr(&sas, i)) 1060 if (dlm_our_addr(&sas, i))
1061 break; 1061 break;
1062 1062
1063 addr = kmalloc(sizeof(*addr), GFP_KERNEL); 1063 addr = kmalloc(sizeof(*addr), GFP_NOFS);
1064 if (!addr) 1064 if (!addr)
1065 break; 1065 break;
1066 memcpy(addr, &sas, sizeof(*addr)); 1066 memcpy(addr, &sas, sizeof(*addr));
@@ -1099,7 +1099,7 @@ static int sctp_listen_for_all(void)
1099 struct sockaddr_storage localaddr; 1099 struct sockaddr_storage localaddr;
1100 struct sctp_event_subscribe subscribe; 1100 struct sctp_event_subscribe subscribe;
1101 int result = -EINVAL, num = 1, i, addr_len; 1101 int result = -EINVAL, num = 1, i, addr_len;
1102 struct connection *con = nodeid2con(0, GFP_KERNEL); 1102 struct connection *con = nodeid2con(0, GFP_NOFS);
1103 int bufsize = NEEDED_RMEM; 1103 int bufsize = NEEDED_RMEM;
1104 1104
1105 if (!con) 1105 if (!con)
@@ -1171,7 +1171,7 @@ out:
1171static int tcp_listen_for_all(void) 1171static int tcp_listen_for_all(void)
1172{ 1172{
1173 struct socket *sock = NULL; 1173 struct socket *sock = NULL;
1174 struct connection *con = nodeid2con(0, GFP_KERNEL); 1174 struct connection *con = nodeid2con(0, GFP_NOFS);
1175 int result = -EINVAL; 1175 int result = -EINVAL;
1176 1176
1177 if (!con) 1177 if (!con)