summaryrefslogtreecommitdiffstats
path: root/block/compat_ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 11:07:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 11:07:02 -0400
commit4a319a490ca59a746b3d36768c0e29ee19832366 (patch)
tree41c34e68fdf2477aa9ae40d8c3d77cdec93f568b /block/compat_ioctl.c
parentf0094b28f3038936c1985be64dbe83f0e950b671 (diff)
parentd97a86c170b4e432f76db072a827fe30b4d6f659 (diff)
Merge branch 'for-3.17/core' of git://git.kernel.dk/linux-block
Pull block core bits from Jens Axboe: "Small round this time, after the massive blk-mq dump for 3.16. This pull request contains: - Fixes for max_sectors overflow in ioctls from Akinoby Mita. - Partition off-by-one bug fix in aix partitions from Dan Carpenter. - Various small partition cleanups from Fabian Frederick. - Fix for the block integrity code sometimes returning the wrong vector count from Gu Zheng. - Cleanup an re-org of the blk-mq queue enter/exit percpu counters from Tejun. Dependent on the percpu pull for 3.17 (which was in the block tree too), that you have already pulled in. - A blkcg oops fix, also from Tejun" * 'for-3.17/core' of git://git.kernel.dk/linux-block: partitions: aix.c: off by one bug blkcg: don't call into policy draining if root_blkg is already gone Revert "bio: modify __bio_add_page() to accept pages that don't start a new segment" bio: modify __bio_add_page() to accept pages that don't start a new segment block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX block/partitions/efi.c: kerneldoc fixing block/partitions/msdos.c: code clean-up block/partitions/amiga.c: replace nolevel printk by pr_err block/partitions/aix.c: replace count*size kzalloc by kcalloc bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload blk-mq: use percpu_ref for mq usage count blk-mq: collapse __blk_mq_drain_queue() into blk_mq_freeze_queue() blk-mq: decouble blk-mq freezing from generic bypassing block, blk-mq: draining can't be skipped even if bypass_depth was non-zero blk-mq: fix a memory ordering bug in blk_mq_queue_enter()
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r--block/compat_ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
index a0926a6094b2..18b282ce361e 100644
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -663,6 +663,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
663 fmode_t mode = file->f_mode; 663 fmode_t mode = file->f_mode;
664 struct backing_dev_info *bdi; 664 struct backing_dev_info *bdi;
665 loff_t size; 665 loff_t size;
666 unsigned int max_sectors;
666 667
667 /* 668 /*
668 * O_NDELAY can be altered using fcntl(.., F_SETFL, ..), so we have 669 * O_NDELAY can be altered using fcntl(.., F_SETFL, ..), so we have
@@ -719,8 +720,9 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
719 case BLKSSZGET: /* get block device hardware sector size */ 720 case BLKSSZGET: /* get block device hardware sector size */
720 return compat_put_int(arg, bdev_logical_block_size(bdev)); 721 return compat_put_int(arg, bdev_logical_block_size(bdev));
721 case BLKSECTGET: 722 case BLKSECTGET:
722 return compat_put_ushort(arg, 723 max_sectors = min_t(unsigned int, USHRT_MAX,
723 queue_max_sectors(bdev_get_queue(bdev))); 724 queue_max_sectors(bdev_get_queue(bdev)));
725 return compat_put_ushort(arg, max_sectors);
724 case BLKROTATIONAL: 726 case BLKROTATIONAL:
725 return compat_put_ushort(arg, 727 return compat_put_ushort(arg,
726 !blk_queue_nonrot(bdev_get_queue(bdev))); 728 !blk_queue_nonrot(bdev_get_queue(bdev)));