diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmast.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmast.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 355593dd8ef8..42775e2bbe2c 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
@@ -197,12 +197,14 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
197 | lock->ml.node == dlm->node_num ? "master" : | 197 | lock->ml.node == dlm->node_num ? "master" : |
198 | "remote"); | 198 | "remote"); |
199 | memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); | 199 | memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); |
200 | } else if (lksb->flags & DLM_LKSB_PUT_LVB) { | ||
201 | mlog(0, "setting lvb from lockres for %s node\n", | ||
202 | lock->ml.node == dlm->node_num ? "master" : | ||
203 | "remote"); | ||
204 | memcpy(res->lvb, lksb->lvb, DLM_LVB_LEN); | ||
205 | } | 200 | } |
201 | /* Do nothing for lvb put requests - they should be done in | ||
202 | * place when the lock is downconverted - otherwise we risk | ||
203 | * racing gets and puts which could result in old lvb data | ||
204 | * being propagated. We leave the put flag set and clear it | ||
205 | * here. In the future we might want to clear it at the time | ||
206 | * the put is actually done. | ||
207 | */ | ||
206 | spin_unlock(&res->spinlock); | 208 | spin_unlock(&res->spinlock); |
207 | } | 209 | } |
208 | 210 | ||
@@ -381,8 +383,7 @@ do_ast: | |||
381 | ret = DLM_NORMAL; | 383 | ret = DLM_NORMAL; |
382 | if (past->type == DLM_AST) { | 384 | if (past->type == DLM_AST) { |
383 | /* do not alter lock refcount. switching lists. */ | 385 | /* do not alter lock refcount. switching lists. */ |
384 | list_del_init(&lock->list); | 386 | list_move_tail(&lock->list, &res->granted); |
385 | list_add_tail(&lock->list, &res->granted); | ||
386 | mlog(0, "ast: adding to granted list... type=%d, " | 387 | mlog(0, "ast: adding to granted list... type=%d, " |
387 | "convert_type=%d\n", lock->ml.type, lock->ml.convert_type); | 388 | "convert_type=%d\n", lock->ml.type, lock->ml.convert_type); |
388 | if (lock->ml.convert_type != LKM_IVMODE) { | 389 | if (lock->ml.convert_type != LKM_IVMODE) { |