diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-11-12 17:49:48 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2008-12-23 11:15:40 -0500 |
commit | d6d7b702a3a1ca50f7ca2bebaa79c80425156bac (patch) | |
tree | 58399f82a48ca2a02bea7bdadc14925858a8017a /fs/dlm/memory.c | |
parent | 58e20d8d344b0ee083febb18c2b021d2427e56ca (diff) |
dlm: fix up memory allocation flags
Use ls_allocation for memory allocations, which a cluster fs sets to
GFP_NOFS. Use GFP_NOFS for allocations when no lockspace struct is
available. Taking dlm locks needs to avoid calling back into the
cluster fs because write-out can require taking dlm locks.
Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/memory.c')
-rw-r--r-- | fs/dlm/memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index 54c14c6d06cb..c1775b84ebab 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c | |||
@@ -39,7 +39,7 @@ char *dlm_allocate_lvb(struct dlm_ls *ls) | |||
39 | { | 39 | { |
40 | char *p; | 40 | char *p; |
41 | 41 | ||
42 | p = kzalloc(ls->ls_lvblen, GFP_KERNEL); | 42 | p = kzalloc(ls->ls_lvblen, ls->ls_allocation); |
43 | return p; | 43 | return p; |
44 | } | 44 | } |
45 | 45 | ||
@@ -57,7 +57,7 @@ struct dlm_rsb *dlm_allocate_rsb(struct dlm_ls *ls, int namelen) | |||
57 | 57 | ||
58 | DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,); | 58 | DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,); |
59 | 59 | ||
60 | r = kzalloc(sizeof(*r) + namelen, GFP_KERNEL); | 60 | r = kzalloc(sizeof(*r) + namelen, ls->ls_allocation); |
61 | return r; | 61 | return r; |
62 | } | 62 | } |
63 | 63 | ||
@@ -72,7 +72,7 @@ struct dlm_lkb *dlm_allocate_lkb(struct dlm_ls *ls) | |||
72 | { | 72 | { |
73 | struct dlm_lkb *lkb; | 73 | struct dlm_lkb *lkb; |
74 | 74 | ||
75 | lkb = kmem_cache_zalloc(lkb_cache, GFP_KERNEL); | 75 | lkb = kmem_cache_zalloc(lkb_cache, ls->ls_allocation); |
76 | return lkb; | 76 | return lkb; |
77 | } | 77 | } |
78 | 78 | ||