Skip to content

Commit b2c0fcd

Browse files
arndbaxboe
authored andcommitted
compat_ioctl: block: handle Persistent Reservations
These were added to blkdev_ioctl() in linux-5.5 but not blkdev_compat_ioctl, so add them now. Cc: <[email protected]> # v4.4+ Fixes: bbd3e06 ("block: add an API for Persistent Reservations") Signed-off-by: Arnd Bergmann <[email protected]> Fold in followup patch from Arnd with missing pr.h header include. Signed-off-by: Jens Axboe <[email protected]>
1 parent 4b43f31 commit b2c0fcd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

block/compat_ioctl.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/compat.h>
77
#include <linux/elevator.h>
88
#include <linux/hdreg.h>
9+
#include <linux/pr.h>
910
#include <linux/slab.h>
1011
#include <linux/syscalls.h>
1112
#include <linux/types.h>
@@ -408,6 +409,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
408409
case BLKTRACETEARDOWN: /* compatible */
409410
ret = blk_trace_ioctl(bdev, cmd, compat_ptr(arg));
410411
return ret;
412+
case IOC_PR_REGISTER:
413+
case IOC_PR_RESERVE:
414+
case IOC_PR_RELEASE:
415+
case IOC_PR_PREEMPT:
416+
case IOC_PR_PREEMPT_ABORT:
417+
case IOC_PR_CLEAR:
418+
return blkdev_ioctl(bdev, mode, cmd,
419+
(unsigned long)compat_ptr(arg));
411420
default:
412421
if (disk->fops->compat_ioctl)
413422
ret = disk->fops->compat_ioctl(bdev, mode, cmd, arg);

0 commit comments

Comments
 (0)