From: Evan Green Date: Mon, 2 Jul 2018 23:03:46 +0000 (-0700) Subject: UPSTREAM: loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl X-Git-Tag: MMI-QSAS30.62-33-3~109 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9fbf95571148ce7c7b6802dd2bd7b1b2c1d75ad3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git UPSTREAM: loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl This change adds LOOP_SET_BLOCK_SIZE as one of the supported ioctls in lo_compat_ioctl. It only takes an unsigned long argument, and in practice a 32-bit value works fine. Mot-CRs-fixed: (CR) Bug: 117823094 Change-Id: I0061a082eb2632c47b7d66f35f2c909d33ff1653 Reviewed-by: Omar Sandoval Signed-off-by: Evan Green Signed-off-by: Jens Axboe (cherry picked from commit 9fea4b395260175de4016b42982f45a3e6e03d0b) Signed-off-by: Martijn Coenen Reviewed-on: https://gerrit.mot.com/1427694 Tested-by: Jira Key SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 24a3fb35614f..fc17c6474275 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1606,6 +1606,7 @@ static int lo_compat_ioctl(struct block_device *bdev, fmode_t mode, arg = (unsigned long) compat_ptr(arg); case LOOP_SET_FD: case LOOP_CHANGE_FD: + case LOOP_SET_BLOCK_SIZE: err = lo_ioctl(bdev, mode, cmd, arg); break; default: