Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dlm: Switch to using wait_event()

We saw an issue in a production server on a customer deployment where
DLM 4.0.7 gets "stuck" and unable to join new lockspaces.

There is no useful response for the dlm in do_event() if
wait_event_interruptible() is interrupted, so switch to
wait_event().

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: David Teigland <teigland@redhat.com>

authored by

Ross Lagerwall and committed by
David Teigland
f084a4f4 90db4f8b

+4 -14
+4 -14
fs/dlm/lockspace.c
··· 197 197 198 198 static int do_uevent(struct dlm_ls *ls, int in) 199 199 { 200 - int error; 201 - 202 200 if (in) 203 201 kobject_uevent(&ls->ls_kobj, KOBJ_ONLINE); 204 202 else ··· 207 209 /* dlm_controld will see the uevent, do the necessary group management 208 210 and then write to sysfs to wake us */ 209 211 210 - error = wait_event_interruptible(ls->ls_uevent_wait, 211 - test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags)); 212 + wait_event(ls->ls_uevent_wait, 213 + test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags)); 212 214 213 - log_rinfo(ls, "group event done %d %d", error, ls->ls_uevent_result); 215 + log_rinfo(ls, "group event done %d", ls->ls_uevent_result); 214 216 215 - if (error) 216 - goto out; 217 - 218 - error = ls->ls_uevent_result; 219 - out: 220 - if (error) 221 - log_error(ls, "group %s failed %d %d", in ? "join" : "leave", 222 - error, ls->ls_uevent_result); 223 - return error; 217 + return ls->ls_uevent_result; 224 218 } 225 219 226 220 static int dlm_uevent(struct kset *kset, struct kobject *kobj,