diff options
author | David Teigland <teigland@redhat.com> | 2009-11-30 16:34:43 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2009-11-30 16:34:43 -0600 |
commit | 573c24c4af6664ffcd9aa7ba617a35fde2b95534 (patch) | |
tree | 9222c0c8921fda5b842c2d1007d911d47bd4fe7c /fs/dlm/dir.c | |
parent | a8a8a669ea13d792296737505adc43ccacf3a648 (diff) | |
download | op-kernel-dev-573c24c4af6664ffcd9aa7ba617a35fde2b95534.zip op-kernel-dev-573c24c4af6664ffcd9aa7ba617a35fde2b95534.tar.gz |
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/dir.c')
-rw-r--r-- | fs/dlm/dir.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c index c4dfa1d..7b84c1d 100644 --- a/fs/dlm/dir.c +++ b/fs/dlm/dir.c @@ -49,8 +49,7 @@ static struct dlm_direntry *get_free_de(struct dlm_ls *ls, int len) spin_unlock(&ls->ls_recover_list_lock); if (!found) - de = kzalloc(sizeof(struct dlm_direntry) + len, - ls->ls_allocation); + de = kzalloc(sizeof(struct dlm_direntry) + len, GFP_NOFS); return de; } @@ -212,7 +211,7 @@ int dlm_recover_directory(struct dlm_ls *ls) dlm_dir_clear(ls); - last_name = kmalloc(DLM_RESNAME_MAXLEN, ls->ls_allocation); + last_name = kmalloc(DLM_RESNAME_MAXLEN, GFP_NOFS); if (!last_name) goto out; @@ -323,7 +322,7 @@ static int get_entry(struct dlm_ls *ls, int nodeid, char *name, if (namelen > DLM_RESNAME_MAXLEN) return -EINVAL; - de = kzalloc(sizeof(struct dlm_direntry) + namelen, ls->ls_allocation); + de = kzalloc(sizeof(struct dlm_direntry) + namelen, GFP_NOFS); if (!de) return -ENOMEM; |