Skip to content

Commit f084a4f

Browse files
rosslagerwallteigland
authored andcommitted
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 <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 90db4f8 commit f084a4f

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

fs/dlm/lockspace.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ static struct kset *dlm_kset;
197197

198198
static int do_uevent(struct dlm_ls *ls, int in)
199199
{
200-
int error;
201-
202200
if (in)
203201
kobject_uevent(&ls->ls_kobj, KOBJ_ONLINE);
204202
else
@@ -209,20 +207,12 @@ static int do_uevent(struct dlm_ls *ls, int in)
209207
/* dlm_controld will see the uevent, do the necessary group management
210208
and then write to sysfs to wake us */
211209

212-
error = wait_event_interruptible(ls->ls_uevent_wait,
213-
test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags));
210+
wait_event(ls->ls_uevent_wait,
211+
test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags));
214212

215-
log_rinfo(ls, "group event done %d %d", error, ls->ls_uevent_result);
216-
217-
if (error)
218-
goto out;
213+
log_rinfo(ls, "group event done %d", ls->ls_uevent_result);
219214

220-
error = ls->ls_uevent_result;
221-
out:
222-
if (error)
223-
log_error(ls, "group %s failed %d %d", in ? "join" : "leave",
224-
error, ls->ls_uevent_result);
225-
return error;
215+
return ls->ls_uevent_result;
226216
}
227217

228218
static int dlm_uevent(struct kset *kset, struct kobject *kobj,

0 commit comments

Comments
 (0)