Skip to content

Commit

Permalink
mtd: blktrans: kill BKL
Browse files Browse the repository at this point in the history
It not needed, because I already added locking for all fops
methods.

Signed-off-by: Maxim Levitsky <maximlevisky@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Maxim Levitsky authored and David Woodhouse committed Oct 25, 2010
1 parent 008c751 commit 480792b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
if (!dev)
return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/

lock_kernel();
mutex_lock(&dev->lock);

if (dev->open++)
Expand All @@ -198,7 +197,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
unlock:
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
unlock_kernel();
return ret;
}

Expand All @@ -210,7 +208,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
if (!dev)
return ret;

lock_kernel();
mutex_lock(&dev->lock);

if (--dev->open)
Expand All @@ -226,7 +223,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
unlock:
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
unlock_kernel();
return ret;
}

Expand Down Expand Up @@ -259,7 +255,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
if (!dev)
return ret;

lock_kernel();
mutex_lock(&dev->lock);

if (!dev->mtd)
Expand All @@ -274,7 +269,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
}
unlock:
mutex_unlock(&dev->lock);
unlock_kernel();
blktrans_dev_put(dev);
return ret;
}
Expand Down

0 comments on commit 480792b

Please sign in to comment.