DLM: fix overflow dlm_cb_seq

dlm_cb_seq is 64 bits. If dlm_cb_seq overflows and returns to 0,
dlm_rem_lkb_callback() will not work properly.

Signed-off-by: Tadashi Miyauchi <[email protected]>
Signed-off-by: Tsutomu Owa <[email protected]>
Signed-off-by: David Teigland <[email protected]>
This commit is contained in:
[email protected] 2017-09-12 09:01:46 +00:00 • committed by David Teigland
commit ccbbea0432

View file

@ -181,6 +181,8 @@ void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status,
spin_lock(&dlm_cb_seq_spin);
new_seq = ++dlm_cb_seq;
if (!dlm_cb_seq)
new_seq = ++dlm_cb_seq;
spin_unlock(&dlm_cb_seq_spin);
if (lkb->lkb_flags & DLM_IFL_USER) {