diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-05 16:43:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-05 16:43:16 -0700 |
commit | e3cea0cad147a9ab4f0e74a2fbdf15d18df1f820 (patch) | |
tree | e373731c062fcf7868c4af1c42a128a6cbcd6cd7 /fs | |
parent | 3803d5e4d3ce2600ffddc16a1999798bc719042d (diff) | |
parent | fe204591cc9480347af7d2d6029b24a62e449486 (diff) | |
download | linux-e3cea0cad147a9ab4f0e74a2fbdf15d18df1f820.tar.bz2 |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/dlm_internal.h | 7 | ||||
-rw-r--r-- | fs/dlm/lockspace.c | 18 | ||||
-rw-r--r-- | fs/dlm/rcom.c | 2 | ||||
-rw-r--r-- | fs/dlm/user.c | 2 |
4 files changed, 9 insertions, 20 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 416d9de35679..04fe9f525ac7 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -97,7 +97,6 @@ do { \ __LINE__, __FILE__, #x, jiffies); \ {do} \ printk("\n"); \ - BUG(); \ panic("DLM: Record message above and reboot.\n"); \ } \ } @@ -421,7 +420,7 @@ struct dlm_message { int m_bastmode; int m_asts; 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 { uint64_t rc_id; /* match reply with request */ uint64_t rc_seq; /* sender's ls_recover_seq */ uint64_t rc_seq_reply; /* remote ls_recover_seq */ - char rc_buf[0]; + char rc_buf[]; }; union dlm_packet { @@ -506,7 +505,7 @@ struct rcom_lock { __le16 rl_wait_type; __le16 rl_namelen; char rl_name[DLM_RESNAME_MAXLEN]; - char rl_lvb[0]; + char rl_lvb[]; }; /* diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index afb8340918b8..e93670ecfae5 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -197,8 +197,6 @@ static struct kset *dlm_kset; static int do_uevent(struct dlm_ls *ls, int in) { - int error; - if (in) kobject_uevent(&ls->ls_kobj, KOBJ_ONLINE); else @@ -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 and then write to sysfs to wake us */ - error = wait_event_interruptible(ls->ls_uevent_wait, - test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags)); + wait_event(ls->ls_uevent_wait, + test_and_clear_bit(LSFL_UEVENT_WAIT, &ls->ls_flags)); - log_rinfo(ls, "group event done %d %d", error, ls->ls_uevent_result); - - if (error) - goto out; + log_rinfo(ls, "group event done %d", ls->ls_uevent_result); - error = 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; + return ls->ls_uevent_result; } static int dlm_uevent(struct kset *kset, struct kobject *kobj, diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c index e3d9f72c640d..4daf5dc2b51c 100644 --- a/fs/dlm/rcom.c +++ b/fs/dlm/rcom.c @@ -563,7 +563,7 @@ void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid) lock = 1; reply = 1; break; - }; + } spin_lock(&ls->ls_recover_lock); status = ls->ls_recover_status; diff --git a/fs/dlm/user.c b/fs/dlm/user.c index 5264bac75115..e5cefa90b1ce 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -46,7 +46,7 @@ struct dlm_lock_params32 { __u32 bastaddr; __u32 lksb; char lvb[DLM_USER_LVB_LEN]; - char name[0]; + char name[]; }; struct dlm_write_request32 { |