提交 480792b7 编写于 作者: M Maxim Levitsky 提交者: David Woodhouse

mtd: blktrans: kill BKL

It not needed, because I already added locking for all fops
methods.
Signed-off-by: NMaxim Levitsky <maximlevisky@gmail.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 008c751e
...@@ -181,7 +181,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) ...@@ -181,7 +181,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
if (!dev) if (!dev)
return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/ return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/
lock_kernel();
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
if (dev->open++) if (dev->open++)
...@@ -198,7 +197,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) ...@@ -198,7 +197,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
unlock: unlock:
mutex_unlock(&dev->lock); mutex_unlock(&dev->lock);
blktrans_dev_put(dev); blktrans_dev_put(dev);
unlock_kernel();
return ret; return ret;
} }
...@@ -210,7 +208,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode) ...@@ -210,7 +208,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
if (!dev) if (!dev)
return ret; return ret;
lock_kernel();
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
if (--dev->open) if (--dev->open)
...@@ -226,7 +223,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode) ...@@ -226,7 +223,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
unlock: unlock:
mutex_unlock(&dev->lock); mutex_unlock(&dev->lock);
blktrans_dev_put(dev); blktrans_dev_put(dev);
unlock_kernel();
return ret; return ret;
} }
...@@ -259,7 +255,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -259,7 +255,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
if (!dev) if (!dev)
return ret; return ret;
lock_kernel();
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
if (!dev->mtd) if (!dev->mtd)
...@@ -274,7 +269,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -274,7 +269,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
} }
unlock: unlock:
mutex_unlock(&dev->lock); mutex_unlock(&dev->lock);
unlock_kernel();
blktrans_dev_put(dev); blktrans_dev_put(dev);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册