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/plock.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/plock.c')
-rw-r--r-- | fs/dlm/plock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 16f682e26c07..2863deb178e2 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -82,7 +82,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
82 | if (!ls) | 82 | if (!ls) |
83 | return -EINVAL; | 83 | return -EINVAL; |
84 | 84 | ||
85 | xop = kzalloc(sizeof(*xop), GFP_KERNEL); | 85 | xop = kzalloc(sizeof(*xop), GFP_NOFS); |
86 | if (!xop) { | 86 | if (!xop) { |
87 | rv = -ENOMEM; | 87 | rv = -ENOMEM; |
88 | goto out; | 88 | goto out; |
@@ -211,7 +211,7 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
211 | if (!ls) | 211 | if (!ls) |
212 | return -EINVAL; | 212 | return -EINVAL; |
213 | 213 | ||
214 | op = kzalloc(sizeof(*op), GFP_KERNEL); | 214 | op = kzalloc(sizeof(*op), GFP_NOFS); |
215 | if (!op) { | 215 | if (!op) { |
216 | rv = -ENOMEM; | 216 | rv = -ENOMEM; |
217 | goto out; | 217 | goto out; |
@@ -266,7 +266,7 @@ int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
266 | if (!ls) | 266 | if (!ls) |
267 | return -EINVAL; | 267 | return -EINVAL; |
268 | 268 | ||
269 | op = kzalloc(sizeof(*op), GFP_KERNEL); | 269 | op = kzalloc(sizeof(*op), GFP_NOFS); |
270 | if (!op) { | 270 | if (!op) { |
271 | rv = -ENOMEM; | 271 | rv = -ENOMEM; |
272 | goto out; | 272 | goto out; |