From: Roland Dreier Date: Fri, 25 Jul 2008 03:36:59 +0000 (-0700) Subject: RDMA/ucm: BKL is not needed for ib_ucm_open() X-Git-Tag: upstream/snapshot3+hdmi~23350^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ba18b186c979283a2bf75a28b7ea325184b0c08;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git RDMA/ucm: BKL is not needed for ib_ucm_open() Remove explicit cycle_kernel_lock() call and document why the code is safe. Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index 9494005..e603736 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c @@ -43,7 +43,6 @@ #include #include #include -#include #include @@ -1154,11 +1153,18 @@ static unsigned int ib_ucm_poll(struct file *filp, return mask; } +/* + * ib_ucm_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 ib_ucm_open(struct inode *inode, struct file *filp) { struct ib_ucm_file *file; - cycle_kernel_lock(); file = kmalloc(sizeof(*file), GFP_KERNEL); if (!file) return -ENOMEM;