diff options
Diffstat (limited to 'block/ioctl.c')
-rw-r--r-- | block/ioctl.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index d6cda8147c91..6c7bf903742f 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
@@ -356,8 +356,6 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, | |||
356 | if (!arg) | 356 | if (!arg) |
357 | return -EINVAL; | 357 | return -EINVAL; |
358 | bdi = blk_get_backing_dev_info(bdev); | 358 | bdi = blk_get_backing_dev_info(bdev); |
359 | if (bdi == NULL) | ||
360 | return -ENOTTY; | ||
361 | return put_long(arg, (bdi->ra_pages * PAGE_CACHE_SIZE) / 512); | 359 | return put_long(arg, (bdi->ra_pages * PAGE_CACHE_SIZE) / 512); |
362 | case BLKROGET: | 360 | case BLKROGET: |
363 | return put_int(arg, bdev_read_only(bdev) != 0); | 361 | return put_int(arg, bdev_read_only(bdev) != 0); |
@@ -386,8 +384,6 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, | |||
386 | if(!capable(CAP_SYS_ADMIN)) | 384 | if(!capable(CAP_SYS_ADMIN)) |
387 | return -EACCES; | 385 | return -EACCES; |
388 | bdi = blk_get_backing_dev_info(bdev); | 386 | bdi = blk_get_backing_dev_info(bdev); |
389 | if (bdi == NULL) | ||
390 | return -ENOTTY; | ||
391 | bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE; | 387 | bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE; |
392 | return 0; | 388 | return 0; |
393 | case BLKBSZSET: | 389 | case BLKBSZSET: |