diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/netlink.c | 10 | ||||
-rw-r--r-- | fs/quota/netlink.c | 16 |
2 files changed, 20 insertions, 6 deletions
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 60a327863b11..e7cfbaf8d0e2 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
@@ -74,14 +74,16 @@ static int user_cmd(struct sk_buff *skb, struct genl_info *info) | |||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct genl_ops dlm_nl_ops = { | 77 | static struct genl_ops dlm_nl_ops[] = { |
78 | .cmd = DLM_CMD_HELLO, | 78 | { |
79 | .doit = user_cmd, | 79 | .cmd = DLM_CMD_HELLO, |
80 | .doit = user_cmd, | ||
81 | }, | ||
80 | }; | 82 | }; |
81 | 83 | ||
82 | int __init dlm_netlink_init(void) | 84 | int __init dlm_netlink_init(void) |
83 | { | 85 | { |
84 | return genl_register_family_with_ops(&family, &dlm_nl_ops, 1); | 86 | return genl_register_family_with_ops(&family, dlm_nl_ops); |
85 | } | 87 | } |
86 | 88 | ||
87 | void dlm_netlink_exit(void) | 89 | void dlm_netlink_exit(void) |
diff --git a/fs/quota/netlink.c b/fs/quota/netlink.c index 16e8abb7709b..72d29177998e 100644 --- a/fs/quota/netlink.c +++ b/fs/quota/netlink.c | |||
@@ -9,13 +9,25 @@ | |||
9 | #include <net/netlink.h> | 9 | #include <net/netlink.h> |
10 | #include <net/genetlink.h> | 10 | #include <net/genetlink.h> |
11 | 11 | ||
12 | static const struct genl_multicast_group quota_mcgrps[] = { | ||
13 | { .name = "events", }, | ||
14 | }; | ||
15 | |||
12 | /* Netlink family structure for quota */ | 16 | /* Netlink family structure for quota */ |
13 | static struct genl_family quota_genl_family = { | 17 | static struct genl_family quota_genl_family = { |
14 | .id = GENL_ID_GENERATE, | 18 | /* |
19 | * Needed due to multicast group ID abuse - old code assumed | ||
20 | * the family ID was also a valid multicast group ID (which | ||
21 | * isn't true) and userspace might thus rely on it. Assign a | ||
22 | * static ID for this group to make dealing with that easier. | ||
23 | */ | ||
24 | .id = GENL_ID_VFS_DQUOT, | ||
15 | .hdrsize = 0, | 25 | .hdrsize = 0, |
16 | .name = "VFS_DQUOT", | 26 | .name = "VFS_DQUOT", |
17 | .version = 1, | 27 | .version = 1, |
18 | .maxattr = QUOTA_NL_A_MAX, | 28 | .maxattr = QUOTA_NL_A_MAX, |
29 | .mcgrps = quota_mcgrps, | ||
30 | .n_mcgrps = ARRAY_SIZE(quota_mcgrps), | ||
19 | }; | 31 | }; |
20 | 32 | ||
21 | /** | 33 | /** |
@@ -78,7 +90,7 @@ void quota_send_warning(struct kqid qid, dev_t dev, | |||
78 | goto attr_err_out; | 90 | goto attr_err_out; |
79 | genlmsg_end(skb, msg_head); | 91 | genlmsg_end(skb, msg_head); |
80 | 92 | ||
81 | genlmsg_multicast(skb, 0, quota_genl_family.id, GFP_NOFS); | 93 | genlmsg_multicast("a_genl_family, skb, 0, 0, GFP_NOFS); |
82 | return; | 94 | return; |
83 | attr_err_out: | 95 | attr_err_out: |
84 | printk(KERN_ERR "VFS: Not enough space to compose quota message!\n"); | 96 | printk(KERN_ERR "VFS: Not enough space to compose quota message!\n"); |