diff options
Diffstat (limited to 'fs/dlm/requestqueue.c')
-rw-r--r-- | fs/dlm/requestqueue.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/dlm/requestqueue.c b/fs/dlm/requestqueue.c index 0226d2a0a0fa..65008d79c96d 100644 --- a/fs/dlm/requestqueue.c +++ b/fs/dlm/requestqueue.c | |||
@@ -36,9 +36,6 @@ int dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_header *hd) | |||
36 | int length = hd->h_length; | 36 | int length = hd->h_length; |
37 | int rv = 0; | 37 | int rv = 0; |
38 | 38 | ||
39 | if (dlm_is_removed(ls, nodeid)) | ||
40 | return 0; | ||
41 | |||
42 | e = kmalloc(sizeof(struct rq_entry) + length, GFP_KERNEL); | 39 | e = kmalloc(sizeof(struct rq_entry) + length, GFP_KERNEL); |
43 | if (!e) { | 40 | if (!e) { |
44 | log_print("dlm_add_requestqueue: out of memory\n"); | 41 | log_print("dlm_add_requestqueue: out of memory\n"); |
@@ -133,6 +130,10 @@ static int purge_request(struct dlm_ls *ls, struct dlm_message *ms, int nodeid) | |||
133 | { | 130 | { |
134 | uint32_t type = ms->m_type; | 131 | uint32_t type = ms->m_type; |
135 | 132 | ||
133 | /* the ls is being cleaned up and freed by release_lockspace */ | ||
134 | if (!ls->ls_count) | ||
135 | return 1; | ||
136 | |||
136 | if (dlm_is_removed(ls, nodeid)) | 137 | if (dlm_is_removed(ls, nodeid)) |
137 | return 1; | 138 | return 1; |
138 | 139 | ||