]> err.no Git - linux-2.6/blobdiff - drivers/infiniband/core/ucma.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6] / drivers / infiniband / core / ucma.c
index 15937eb38aae42f440a71ae6f8240ffc16c057bb..b41dd26bbfa1e1b83654c487d1ff16482bf3746d 100644 (file)
@@ -614,7 +614,7 @@ static ssize_t ucma_query_route(struct ucma_file *file,
        if (!ctx->cm_id->device)
                goto out;
 
-       resp.node_guid = ctx->cm_id->device->node_guid;
+       resp.node_guid = (__force __u64) ctx->cm_id->device->node_guid;
        resp.port_num = ctx->cm_id->port_num;
        switch (rdma_node_get_transport(ctx->cm_id->device->node_type)) {
        case RDMA_TRANSPORT_IB:
@@ -1148,6 +1148,14 @@ static unsigned int ucma_poll(struct file *filp, struct poll_table_struct *wait)
        return mask;
 }
 
+/*
+ * ucma_open() does not need the BKL:
+ *
+ *  - no global state is referred to;
+ *  - there is no ioctl method to race against;
+ *  - no further module initialization is required for open to work
+ *    after the device is registered.
+ */
 static int ucma_open(struct inode *inode, struct file *filp)
 {
        struct ucma_file *file;