dlm: use genl_register_family_with_ops()
authorChangli Gao <xiaosuo@gmail.com>
Mon, 26 Jul 2010 09:19:19 +0000 (17:19 +0800)
committerDavid Teigland <teigland@redhat.com>
Thu, 5 Aug 2010 19:22:01 +0000 (14:22 -0500)
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/netlink.c

index 2c6ad51..ef17e01 100644 (file)
@@ -81,24 +81,11 @@ static struct genl_ops dlm_nl_ops = {
 
 int __init dlm_netlink_init(void)
 {
-       int rv;
-
-       rv = genl_register_family(&family);
-       if (rv)
-               return rv;
-
-       rv = genl_register_ops(&family, &dlm_nl_ops);
-       if (rv < 0)
-               goto err;
-       return 0;
- err:
-       genl_unregister_family(&family);
-       return rv;
+       return genl_register_family_with_ops(&family, &dlm_nl_ops, 1);
 }
 
 void dlm_netlink_exit(void)
 {
-       genl_unregister_ops(&family, &dlm_nl_ops);
        genl_unregister_family(&family);
 }