Commit 8ae40a69 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Only thing here are the changes from Arnd from last week, which now
  have the appropriate header include to ensure they actually compile if
  COMPAT is enabled"

* tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block:
  compat_ioctl: block: handle Persistent Reservations
  compat_ioctl: block: handle add zone open, close and finish ioctl
  compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES
  compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE
  pktcdvd: fix regression on 64-bit architectures
parents a305bd7c b2c0fcd2
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/elevator.h> #include <linux/elevator.h>
#include <linux/hdreg.h> #include <linux/hdreg.h>
#include <linux/pr.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -354,6 +355,13 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) ...@@ -354,6 +355,13 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
* but we call blkdev_ioctl, which gets the lock for us * but we call blkdev_ioctl, which gets the lock for us
*/ */
case BLKRRPART: case BLKRRPART:
case BLKREPORTZONE:
case BLKRESETZONE:
case BLKOPENZONE:
case BLKCLOSEZONE:
case BLKFINISHZONE:
case BLKGETZONESZ:
case BLKGETNRZONES:
return blkdev_ioctl(bdev, mode, cmd, return blkdev_ioctl(bdev, mode, cmd,
(unsigned long)compat_ptr(arg)); (unsigned long)compat_ptr(arg));
case BLKBSZSET_32: case BLKBSZSET_32:
...@@ -401,6 +409,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) ...@@ -401,6 +409,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
case BLKTRACETEARDOWN: /* compatible */ case BLKTRACETEARDOWN: /* compatible */
ret = blk_trace_ioctl(bdev, cmd, compat_ptr(arg)); ret = blk_trace_ioctl(bdev, cmd, compat_ptr(arg));
return ret; return ret;
case IOC_PR_REGISTER:
case IOC_PR_RESERVE:
case IOC_PR_RELEASE:
case IOC_PR_PREEMPT:
case IOC_PR_PREEMPT_ABORT:
case IOC_PR_CLEAR:
return blkdev_ioctl(bdev, mode, cmd,
(unsigned long)compat_ptr(arg));
default: default:
if (disk->fops->compat_ioctl) if (disk->fops->compat_ioctl)
ret = disk->fops->compat_ioctl(bdev, mode, cmd, arg); ret = disk->fops->compat_ioctl(bdev, mode, cmd, arg);
......
...@@ -2707,7 +2707,7 @@ static const struct block_device_operations pktcdvd_ops = { ...@@ -2707,7 +2707,7 @@ static const struct block_device_operations pktcdvd_ops = {
.release = pkt_close, .release = pkt_close,
.ioctl = pkt_ioctl, .ioctl = pkt_ioctl,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.ioctl = pkt_compat_ioctl, .compat_ioctl = pkt_compat_ioctl,
#endif #endif
.check_events = pkt_check_events, .check_events = pkt_check_events,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment