aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-09-11 20:47:23 +0200
committerArnd Bergmann <arnd@arndb.de>2019-10-23 17:19:52 +0200
commit18bd6caaef4021803dd0d031dc37c2d001d18a5b (patch)
tree630e1b5e44bb2b01f24c09bb2cc0b49ef56d9de4 /fs/ceph/file.c
parentcompat_sys_ioctl(): make parallel to do_vfs_ioctl() (diff)
downloadlinux-dev-18bd6caaef4021803dd0d031dc37c2d001d18a5b.tar.xz
linux-dev-18bd6caaef4021803dd0d031dc37c2d001d18a5b.zip
ceph: fix compat_ioctl for ceph_dir_operations
The ceph_ioctl function is used both for files and directories, but only the files support doing that in 32-bit compat mode. On the s390 architecture, there is also a problem with invalid 31-bit pointers that need to be passed through compat_ptr(). Use the new compat_ptr_ioctl() to address both issues. Note: When backporting this patch to stable kernels, "compat_ioctl: add compat_ptr_ioctl()" is needed as well. Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index d277f71abe0b..6092ccea50d2 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -2162,7 +2162,7 @@ const struct file_operations ceph_file_fops = {
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.unlocked_ioctl = ceph_ioctl,
- .compat_ioctl = ceph_ioctl,
+ .compat_ioctl = compat_ptr_ioctl,
.fallocate = ceph_fallocate,
.copy_file_range = ceph_copy_file_range,
};