Skip to content

Commit e3cea0c

Browse files
committed
Merge tag 'dlm-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm updates from David Teigland: "This set includes a couple minor cleanups, and dropping the interruptible from a wait_event that waits for an event from the userspace cluster management" * tag 'dlm-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: remove BUG() before panic() dlm: Switch to using wait_event() fs:dlm:remove unneeded semicolon in rcom.c dlm: user: Replace zero-length array with flexible-array member dlm: dlm_internal: Replace zero-length array with flexible-array member
2 parents 3803d5e + fe20459 commit e3cea0c

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

fs/dlm/dlm_internal.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ do { \
9797
__LINE__, __FILE__, #x, jiffies); \
9898
{do} \
9999
printk("\n"); \
100-
BUG(); \
101100
panic("DLM: Record message above and reboot.\n"); \
102101
} \
103102
}
@@ -421,7 +420,7 @@ struct dlm_message {
421420
int m_bastmode;
422421
int m_asts;
423422
int m_result; /* 0 or -EXXX */
424-
char m_extra[0]; /* name or lvb */
423+
char m_extra[]; /* name or lvb */
425424
};
426425

427426

@@ -450,7 +449,7 @@ struct dlm_rcom {
450449
uint64_t rc_id; /* match reply with request */
451450
uint64_t rc_seq; /* sender's ls_recover_seq */
452451
uint64_t rc_seq_reply; /* remote ls_recover_seq */
453-
char rc_buf[0];
452+
char rc_buf[];
454453
};
455454

456455
union dlm_packet {
@@ -506,7 +505,7 @@ struct rcom_lock {
506505
__le16 rl_wait_type;
507506
__le16 rl_namelen;
508507
char rl_name[DLM_RESNAME_MAXLEN];
509-
char rl_lvb[0];
508+
char rl_lvb[];
510509
};
511510

512511
/*

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,

fs/dlm/rcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid)
563563
lock = 1;
564564
reply = 1;
565565
break;
566-
};
566+
}
567567

568568
spin_lock(&ls->ls_recover_lock);
569569
status = ls->ls_recover_status;

fs/dlm/user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct dlm_lock_params32 {
4646
__u32 bastaddr;
4747
__u32 lksb;
4848
char lvb[DLM_USER_LVB_LEN];
49-
char name[0];
49+
char name[];
5050
};
5151

5252
struct dlm_write_request32 {

0 commit comments

Comments
 (0)