]> err.no Git - linux-2.6/blobdiff - fs/dlm/requestqueue.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6] / fs / dlm / requestqueue.c
index 0226d2a0a0faf8107fa5dcbc912c971545bd1048..65008d79c96d2e651091dbd7bcbe47f1e17221ec 100644 (file)
@@ -36,9 +36,6 @@ int dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_header *hd)
        int length = hd->h_length;
        int rv = 0;
 
-       if (dlm_is_removed(ls, nodeid))
-               return 0;
-
        e = kmalloc(sizeof(struct rq_entry) + length, GFP_KERNEL);
        if (!e) {
                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)
 {
        uint32_t type = ms->m_type;
 
+       /* the ls is being cleaned up and freed by release_lockspace */
+       if (!ls->ls_count)
+               return 1;
+
        if (dlm_is_removed(ls, nodeid))
                return 1;