diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2010-11-27 13:49:18 -0500 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-11-27 13:49:18 -0500 |
commit | f30195c50245d8ace628e1978b1daa8df86e7224 (patch) | |
tree | edf4f91c4356c41d50fb07f15cebd1e6442538ad /block/ioctl.c | |
parent | d07335e51df0c6dec202d315fc4f1f7e100eec4e (diff) | |
parent | d4d77629953eabd3c14f6fa5746f6b28babfc55f (diff) |
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/ioctl.c')
-rw-r--r-- | block/ioctl.c | 5 |
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, | |||
295 | return -EINVAL; | 295 | return -EINVAL; |
296 | if (get_user(n, (int __user *) arg)) | 296 | if (get_user(n, (int __user *) arg)) |
297 | return -EFAULT; | 297 | return -EFAULT; |
298 | if (!(mode & FMODE_EXCL) && bd_claim(bdev, &bdev) < 0) | 298 | if (!(mode & FMODE_EXCL) && |
299 | blkdev_get(bdev, mode | FMODE_EXCL, &bdev) < 0) | ||
299 | return -EBUSY; | 300 | return -EBUSY; |
300 | ret = set_blocksize(bdev, n); | 301 | ret = set_blocksize(bdev, n); |
301 | if (!(mode & FMODE_EXCL)) | 302 | if (!(mode & FMODE_EXCL)) |
302 | bd_release(bdev); | 303 | blkdev_put(bdev, mode | FMODE_EXCL); |
303 | return ret; | 304 | return ret; |
304 | case BLKPG: | 305 | case BLKPG: |
305 | ret = blkpg_ioctl(bdev, (struct blkpg_ioctl_arg __user *) arg); | 306 | ret = blkpg_ioctl(bdev, (struct blkpg_ioctl_arg __user *) arg); |