diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 15:56:48 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 15:56:48 -0400 |
| commit | 938a73b959cf77aadc41bded3bf416b618aa20b3 (patch) | |
| tree | 812bdbf0d1dc219d55eaf0e66935a523669ca6c6 | |
| parent | 45480aa75b03d6705ab5ceebda9d09be22f4e928 (diff) | |
| parent | f70cb33b9c270f4f1a7f28327e7d35dbf1a6fc40 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
fs/dlm: Drop unnecessary null test
dlm: use genl_register_family_with_ops()
| -rw-r--r-- | fs/dlm/lowcomms.c | 2 | ||||
| -rw-r--r-- | fs/dlm/netlink.c | 15 |
2 files changed, 2 insertions, 15 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index c0d35c620526..37a34c2c622a 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
| @@ -248,7 +248,7 @@ static struct connection *assoc2con(int assoc_id) | |||
| 248 | 248 | ||
| 249 | for (i = 0 ; i < CONN_HASH_SIZE; i++) { | 249 | for (i = 0 ; i < CONN_HASH_SIZE; i++) { |
| 250 | hlist_for_each_entry(con, h, &connection_hash[i], list) { | 250 | hlist_for_each_entry(con, h, &connection_hash[i], list) { |
| 251 | if (con && con->sctp_assoc == assoc_id) { | 251 | if (con->sctp_assoc == assoc_id) { |
| 252 | mutex_unlock(&connections_lock); | 252 | mutex_unlock(&connections_lock); |
| 253 | return con; | 253 | return con; |
| 254 | } | 254 | } |
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 2c6ad518100d..ef17e0169da1 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
| @@ -81,24 +81,11 @@ static struct genl_ops dlm_nl_ops = { | |||
| 81 | 81 | ||
| 82 | int __init dlm_netlink_init(void) | 82 | int __init dlm_netlink_init(void) |
| 83 | { | 83 | { |
| 84 | int rv; | 84 | return genl_register_family_with_ops(&family, &dlm_nl_ops, 1); |
| 85 | |||
| 86 | rv = genl_register_family(&family); | ||
| 87 | if (rv) | ||
| 88 | return rv; | ||
| 89 | |||
| 90 | rv = genl_register_ops(&family, &dlm_nl_ops); | ||
| 91 | if (rv < 0) | ||
| 92 | goto err; | ||
| 93 | return 0; | ||
| 94 | err: | ||
| 95 | genl_unregister_family(&family); | ||
| 96 | return rv; | ||
| 97 | } | 85 | } |
| 98 | 86 | ||
| 99 | void dlm_netlink_exit(void) | 87 | void dlm_netlink_exit(void) |
| 100 | { | 88 | { |
| 101 | genl_unregister_ops(&family, &dlm_nl_ops); | ||
| 102 | genl_unregister_family(&family); | 89 | genl_unregister_family(&family); |
| 103 | } | 90 | } |
| 104 | 91 | ||
