diff options
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r-- | fs/dlm/lock.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index b56950758188..a579f30f237d 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -5393,6 +5393,13 @@ static void purge_dead_list(struct dlm_ls *ls, struct dlm_rsb *r, | |||
5393 | if ((lkb->lkb_nodeid == nodeid_gone) || | 5393 | if ((lkb->lkb_nodeid == nodeid_gone) || |
5394 | dlm_is_removed(ls, lkb->lkb_nodeid)) { | 5394 | dlm_is_removed(ls, lkb->lkb_nodeid)) { |
5395 | 5395 | ||
5396 | /* tell recover_lvb to invalidate the lvb | ||
5397 | because a node holding EX/PW failed */ | ||
5398 | if ((lkb->lkb_exflags & DLM_LKF_VALBLK) && | ||
5399 | (lkb->lkb_grmode >= DLM_LOCK_PW)) { | ||
5400 | rsb_set_flag(r, RSB_RECOVER_LVB_INVAL); | ||
5401 | } | ||
5402 | |||
5396 | del_lkb(r, lkb); | 5403 | del_lkb(r, lkb); |
5397 | 5404 | ||
5398 | /* this put should free the lkb */ | 5405 | /* this put should free the lkb */ |
@@ -6025,15 +6032,18 @@ static int orphan_proc_lock(struct dlm_ls *ls, struct dlm_lkb *lkb) | |||
6025 | return error; | 6032 | return error; |
6026 | } | 6033 | } |
6027 | 6034 | ||
6028 | /* The force flag allows the unlock to go ahead even if the lkb isn't granted. | 6035 | /* The FORCEUNLOCK flag allows the unlock to go ahead even if the lkb isn't |
6029 | Regardless of what rsb queue the lock is on, it's removed and freed. */ | 6036 | granted. Regardless of what rsb queue the lock is on, it's removed and |
6037 | freed. The IVVALBLK flag causes the lvb on the resource to be invalidated | ||
6038 | if our lock is PW/EX (it's ignored if our granted mode is smaller.) */ | ||
6030 | 6039 | ||
6031 | static int unlock_proc_lock(struct dlm_ls *ls, struct dlm_lkb *lkb) | 6040 | static int unlock_proc_lock(struct dlm_ls *ls, struct dlm_lkb *lkb) |
6032 | { | 6041 | { |
6033 | struct dlm_args args; | 6042 | struct dlm_args args; |
6034 | int error; | 6043 | int error; |
6035 | 6044 | ||
6036 | set_unlock_args(DLM_LKF_FORCEUNLOCK, lkb->lkb_ua, &args); | 6045 | set_unlock_args(DLM_LKF_FORCEUNLOCK | DLM_LKF_IVVALBLK, |
6046 | lkb->lkb_ua, &args); | ||
6037 | 6047 | ||
6038 | error = unlock_lock(ls, lkb, &args); | 6048 | error = unlock_lock(ls, lkb, &args); |
6039 | if (error == -DLM_EUNLOCK) | 6049 | if (error == -DLM_EUNLOCK) |