Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[sfrench/cifs-2.6.git] / drivers / infiniband / core / device.c
index 7f4affe8a10d8e9e2b3354dbeaae7377a44a7c16..9773145dee0996d0d058230bc6ce18f9c138d34f 100644 (file)
@@ -465,7 +465,7 @@ static int alloc_name(struct ib_device *ibdev, const char *name)
        int rc;
        int i;
 
-       lockdep_assert_held_exclusive(&devices_rwsem);
+       lockdep_assert_held_write(&devices_rwsem);
        ida_init(&inuse);
        xa_for_each (&devices, index, device) {
                char buf[IB_DEVICE_NAME_MAX];
@@ -2650,7 +2650,7 @@ static int __init ib_core_init(void)
                goto err_mad;
        }
 
-       ret = register_lsm_notifier(&ibdev_lsm_nb);
+       ret = register_blocking_lsm_notifier(&ibdev_lsm_nb);
        if (ret) {
                pr_warn("Couldn't register LSM notifier. ret %d\n", ret);
                goto err_sa;
@@ -2669,7 +2669,7 @@ static int __init ib_core_init(void)
        return 0;
 
 err_compat:
-       unregister_lsm_notifier(&ibdev_lsm_nb);
+       unregister_blocking_lsm_notifier(&ibdev_lsm_nb);
 err_sa:
        ib_sa_cleanup();
 err_mad:
@@ -2695,7 +2695,7 @@ static void __exit ib_core_cleanup(void)
        nldev_exit();
        rdma_nl_unregister(RDMA_NL_LS);
        unregister_pernet_device(&rdma_dev_net_ops);
-       unregister_lsm_notifier(&ibdev_lsm_nb);
+       unregister_blocking_lsm_notifier(&ibdev_lsm_nb);
        ib_sa_cleanup();
        ib_mad_cleanup();
        addr_cleanup();