requestqueue.c (d4400156d415540086c34a06e5d233122d6bf56a) | requestqueue.c (2896ee37ccc1f9acb244c9b02becb74a43661009) |
---|---|
1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) 2005 Red Hat, Inc. All rights reserved. 5** 6** This copyrighted material is made available to anyone wishing to use, 7** modify, copy, or redistribute it subject to the terms and conditions 8** of the GNU General Public License v.2. --- 22 unchanged lines hidden (view full) --- 31 */ 32 33int dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_header *hd) 34{ 35 struct rq_entry *e; 36 int length = hd->h_length; 37 int rv = 0; 38 | 1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) 2005 Red Hat, Inc. All rights reserved. 5** 6** This copyrighted material is made available to anyone wishing to use, 7** modify, copy, or redistribute it subject to the terms and conditions 8** of the GNU General Public License v.2. --- 22 unchanged lines hidden (view full) --- 31 */ 32 33int dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_header *hd) 34{ 35 struct rq_entry *e; 36 int length = hd->h_length; 37 int rv = 0; 38 |
39 if (dlm_is_removed(ls, nodeid)) 40 return 0; 41 | |
42 e = kmalloc(sizeof(struct rq_entry) + length, GFP_KERNEL); 43 if (!e) { 44 log_print("dlm_add_requestqueue: out of memory\n"); 45 return 0; 46 } 47 48 e->nodeid = nodeid; 49 memcpy(e->request, hd, length); --- 78 unchanged lines hidden (view full) --- 128 } 129 mutex_unlock(&ls->ls_requestqueue_mutex); 130} 131 132static int purge_request(struct dlm_ls *ls, struct dlm_message *ms, int nodeid) 133{ 134 uint32_t type = ms->m_type; 135 | 39 e = kmalloc(sizeof(struct rq_entry) + length, GFP_KERNEL); 40 if (!e) { 41 log_print("dlm_add_requestqueue: out of memory\n"); 42 return 0; 43 } 44 45 e->nodeid = nodeid; 46 memcpy(e->request, hd, length); --- 78 unchanged lines hidden (view full) --- 125 } 126 mutex_unlock(&ls->ls_requestqueue_mutex); 127} 128 129static int purge_request(struct dlm_ls *ls, struct dlm_message *ms, int nodeid) 130{ 131 uint32_t type = ms->m_type; 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 return 1; 138 139 /* directory operations are always purged because the directory is 140 always rebuilt during recovery and the lookups resent */ 141 142 if (type == DLM_MSG_REMOVE || 143 type == DLM_MSG_LOOKUP || --- 54 unchanged lines hidden --- | 137 if (dlm_is_removed(ls, nodeid)) 138 return 1; 139 140 /* directory operations are always purged because the directory is 141 always rebuilt during recovery and the lookups resent */ 142 143 if (type == DLM_MSG_REMOVE || 144 type == DLM_MSG_LOOKUP || --- 54 unchanged lines hidden --- |