Commit e3cea0ca authored by Linus Torvalds's avatar Linus Torvalds

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
parents 3803d5e4 fe204591
...@@ -97,7 +97,6 @@ do { \ ...@@ -97,7 +97,6 @@ do { \
__LINE__, __FILE__, #x, jiffies); \ __LINE__, __FILE__, #x, jiffies); \
{do} \ {do} \
printk("\n"); \ printk("\n"); \
BUG(); \
panic("DLM: Record message above and reboot.\n"); \ panic("DLM: Record message above and reboot.\n"); \
} \ } \
} }
...@@ -421,7 +420,7 @@ struct dlm_message { ...@@ -421,7 +420,7 @@ struct dlm_message {
int m_bastmode; int m_bastmode;
int m_asts; int m_asts;
int m_result; /* 0 or -EXXX */ int m_result; /* 0 or -EXXX */
char m_extra[0]; /* name or lvb */ char m_extra[]; /* name or lvb */
}; };
...@@ -450,7 +449,7 @@ struct dlm_rcom { ...@@ -450,7 +449,7 @@ struct dlm_rcom {
uint64_t rc_id; /* match reply with request */ uint64_t rc_id; /* match reply with request */
uint64_t rc_seq; /* sender's ls_recover_seq */ uint64_t rc_seq; /* sender's ls_recover_seq */
uint64_t rc_seq_reply; /* remote ls_recover_seq */ uint64_t rc_seq_reply; /* remote ls_recover_seq */
char rc_buf[0]; char rc_buf[];
}; };
union dlm_packet { union dlm_packet {
...@@ -506,7 +505,7 @@ struct rcom_lock { ...@@ -506,7 +505,7 @@ struct rcom_lock {
__le16 rl_wait_type; __le16 rl_wait_type;
__le16 rl_namelen; __le16 rl_namelen;
char rl_name[DLM_RESNAME_MAXLEN]; char rl_name[DLM_RESNAME_MAXLEN];
char rl_lvb[0]; char rl_lvb[];
}; };
/* /*
......
...@@ -197,8 +197,6 @@ static struct kset *dlm_kset; ...@@ -197,8 +197,6 @@ static struct kset *dlm_kset;
static int do_uevent(struct dlm_ls *ls, int in) static int do_uevent(struct dlm_ls *ls, int in)
{ {
int error;
if (in) if (in)
kobject_uevent(&ls->ls_kobj, KOBJ_ONLINE); kobject_uevent(&ls->ls_kobj, KOBJ_ONLINE);
else else
...@@ -209,20 +207,12 @@ static int do_uevent(struct dlm_ls *ls, int in) ...@@ -209,20 +207,12 @@ static int do_uevent(struct dlm_ls *ls, int in)
/* dlm_controld will see the uevent, do the necessary group management /* dlm_controld will see the uevent, do the necessary group management
and then write to sysfs to wake us */ and then write to sysfs to wake us */
error = wait_event_interruptible(ls->ls_uevent_wait, wait_event(ls->ls_uevent_wait,
test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags)); test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags));
log_rinfo(ls, "group event done %d %d", error, ls->ls_uevent_result); log_rinfo(ls, "group event done %d", ls->ls_uevent_result);
if (error)
goto out;
error = ls->ls_uevent_result; return ls->ls_uevent_result;
out:
if (error)
log_error(ls, "group %s failed %d %d", in ? "join" : "leave",
error, ls->ls_uevent_result);
return error;
} }
static int dlm_uevent(struct kset *kset, struct kobject *kobj, static int dlm_uevent(struct kset *kset, struct kobject *kobj,
......
...@@ -563,7 +563,7 @@ void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid) ...@@ -563,7 +563,7 @@ void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid)
lock = 1; lock = 1;
reply = 1; reply = 1;
break; break;
}; }
spin_lock(&ls->ls_recover_lock); spin_lock(&ls->ls_recover_lock);
status = ls->ls_recover_status; status = ls->ls_recover_status;
......
...@@ -46,7 +46,7 @@ struct dlm_lock_params32 { ...@@ -46,7 +46,7 @@ struct dlm_lock_params32 {
__u32 bastaddr; __u32 bastaddr;
__u32 lksb; __u32 lksb;
char lvb[DLM_USER_LVB_LEN]; char lvb[DLM_USER_LVB_LEN];
char name[0]; char name[];
}; };
struct dlm_write_request32 { struct dlm_write_request32 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment