summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-11-27 19:49:18 +0100
committerJens Axboe <jaxboe@fusionio.com>2010-11-27 19:49:18 +0100
commitf30195c50245d8ace628e1978b1daa8df86e7224 (patch)
treeedf4f91c4356c41d50fb07f15cebd1e6442538ad /block
parentd07335e51df0c6dec202d315fc4f1f7e100eec4e (diff)
parentd4d77629953eabd3c14f6fa5746f6b28babfc55f (diff)
downloadlinux-f30195c50245d8ace628e1978b1daa8df86e7224.tar.bz2
Merge branch 'cleanup-bd_claim' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into for-2.6.38/core
Diffstat (limited to 'block')
-rw-r--r--block/ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 3d866d0037f2..fefa9a496708 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -295,11 +295,12 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
return -EINVAL;
if (get_user(n, (int __user *) arg))
return -EFAULT;
- if (!(mode & FMODE_EXCL) && bd_claim(bdev, &bdev) < 0)
+ if (!(mode & FMODE_EXCL) &&
+ blkdev_get(bdev, mode | FMODE_EXCL, &bdev) < 0)
return -EBUSY;
ret = set_blocksize(bdev, n);
if (!(mode & FMODE_EXCL))
- bd_release(bdev);
+ blkdev_put(bdev, mode | FMODE_EXCL);
return ret;
case BLKPG:
ret = blkpg_ioctl(bdev, (struct blkpg_ioctl_arg __user *) arg);