aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-12-13 11:40:26 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2007-02-05 13:36:02 -0500
commit075529b5e1ffa8c9864d23930b71b5306a13d9f8 (patch)
tree414833bf6041a82f9e0cd2f813b05fe2da37ead8 /fs/dlm
parent8d07fd509e9c82a59e37b8b18a2fd0e8ef8fc837 (diff)
[DLM] fix lost flags in stub replies
When the dlm fakes an unlock/cancel reply from a failed node using a stub message struct, it wasn't setting the flags in the stub message. So, in the process of receiving the fake message the lkb flags would be updated and cleared from the zero flags in the message. The problem observed in tests was the loss of the USER flag which caused the dlm to think a user lock was a kernel lock and subsequently fail an assertion checking the validity of the ast/callback field. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index d8e919bad41a..ed52485a86d0 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -3148,6 +3148,7 @@ static void recover_convert_waiter(struct dlm_ls *ls, struct dlm_lkb *lkb)
3148 if (middle_conversion(lkb)) { 3148 if (middle_conversion(lkb)) {
3149 hold_lkb(lkb); 3149 hold_lkb(lkb);
3150 ls->ls_stub_ms.m_result = -EINPROGRESS; 3150 ls->ls_stub_ms.m_result = -EINPROGRESS;
3151 ls->ls_stub_ms.m_flags = lkb->lkb_flags;
3151 _remove_from_waiters(lkb); 3152 _remove_from_waiters(lkb);
3152 _receive_convert_reply(lkb, &ls->ls_stub_ms); 3153 _receive_convert_reply(lkb, &ls->ls_stub_ms);
3153 3154
@@ -3221,6 +3222,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls)
3221 case DLM_MSG_UNLOCK: 3222 case DLM_MSG_UNLOCK:
3222 hold_lkb(lkb); 3223 hold_lkb(lkb);
3223 ls->ls_stub_ms.m_result = -DLM_EUNLOCK; 3224 ls->ls_stub_ms.m_result = -DLM_EUNLOCK;
3225 ls->ls_stub_ms.m_flags = lkb->lkb_flags;
3224 _remove_from_waiters(lkb); 3226 _remove_from_waiters(lkb);
3225 _receive_unlock_reply(lkb, &ls->ls_stub_ms); 3227 _receive_unlock_reply(lkb, &ls->ls_stub_ms);
3226 dlm_put_lkb(lkb); 3228 dlm_put_lkb(lkb);
@@ -3229,6 +3231,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls)
3229 case DLM_MSG_CANCEL: 3231 case DLM_MSG_CANCEL:
3230 hold_lkb(lkb); 3232 hold_lkb(lkb);
3231 ls->ls_stub_ms.m_result = -DLM_ECANCEL; 3233 ls->ls_stub_ms.m_result = -DLM_ECANCEL;
3234 ls->ls_stub_ms.m_flags = lkb->lkb_flags;
3232 _remove_from_waiters(lkb); 3235 _remove_from_waiters(lkb);
3233 _receive_cancel_reply(lkb, &ls->ls_stub_ms); 3236 _receive_cancel_reply(lkb, &ls->ls_stub_ms);
3234 dlm_put_lkb(lkb); 3237 dlm_put_lkb(lkb);