From: Jonathan Corbet Date: Thu, 15 May 2008 15:09:23 +0000 (-0600) Subject: bsg: cdev lock_kernel() pushdown X-Git-Tag: v2.6.27-rc1~1103^2~146 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=75bd2ef1457998791cfc89cd59927574488fc22a;p=linux-2.6-omap-h63xx.git bsg: cdev lock_kernel() pushdown Push the cdev lock_kernel call into bsg_open(). Signed-off-by: Jonathan Corbet --- diff --git a/block/bsg.c b/block/bsg.c index f0b7cd34321..dbe3ffd505c 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -834,7 +835,11 @@ static struct bsg_device *bsg_get_device(struct inode *inode, struct file *file) static int bsg_open(struct inode *inode, struct file *file) { - struct bsg_device *bd = bsg_get_device(inode, file); + struct bsg_device *bd; + + lock_kernel(); + bd = bsg_get_device(inode, file); + unlock_kernel(); if (IS_ERR(bd)) return PTR_ERR(bd);