aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/fuse/file.c7
-rw-r--r--include/uapi/linux/fuse.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 1f9da7a5ad0d..3959f08279e6 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2578,8 +2578,13 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
2578#if BITS_PER_LONG == 32 2578#if BITS_PER_LONG == 32
2579 inarg.flags |= FUSE_IOCTL_32BIT; 2579 inarg.flags |= FUSE_IOCTL_32BIT;
2580#else 2580#else
2581 if (flags & FUSE_IOCTL_COMPAT) 2581 if (flags & FUSE_IOCTL_COMPAT) {
2582 inarg.flags |= FUSE_IOCTL_32BIT; 2582 inarg.flags |= FUSE_IOCTL_32BIT;
2583#ifdef CONFIG_X86_X32
2584 if (in_x32_syscall())
2585 inarg.flags |= FUSE_IOCTL_COMPAT_X32;
2586#endif
2587 }
2583#endif 2588#endif
2584 2589
2585 /* assume all the iovs returned by client always fits in a page */ 2590 /* assume all the iovs returned by client always fits in a page */
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index c2bece466520..19fb55e3c73e 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -129,6 +129,7 @@
129 * 129 *
130 * 7.30 130 * 7.30
131 * - add FUSE_EXPLICIT_INVAL_DATA 131 * - add FUSE_EXPLICIT_INVAL_DATA
132 * - add FUSE_IOCTL_COMPAT_X32
132 */ 133 */
133 134
134#ifndef _LINUX_FUSE_H 135#ifndef _LINUX_FUSE_H
@@ -343,6 +344,7 @@ struct fuse_file_lock {
343 * FUSE_IOCTL_RETRY: retry with new iovecs 344 * FUSE_IOCTL_RETRY: retry with new iovecs
344 * FUSE_IOCTL_32BIT: 32bit ioctl 345 * FUSE_IOCTL_32BIT: 32bit ioctl
345 * FUSE_IOCTL_DIR: is a directory 346 * FUSE_IOCTL_DIR: is a directory
347 * FUSE_IOCTL_COMPAT_X32: x32 compat ioctl on 64bit machine (64bit time_t)
346 * 348 *
347 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs 349 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
348 */ 350 */
@@ -351,6 +353,7 @@ struct fuse_file_lock {
351#define FUSE_IOCTL_RETRY (1 << 2) 353#define FUSE_IOCTL_RETRY (1 << 2)
352#define FUSE_IOCTL_32BIT (1 << 3) 354#define FUSE_IOCTL_32BIT (1 << 3)
353#define FUSE_IOCTL_DIR (1 << 4) 355#define FUSE_IOCTL_DIR (1 << 4)
356#define FUSE_IOCTL_COMPAT_X32 (1 << 5)
354 357
355#define FUSE_IOCTL_MAX_IOV 256 358#define FUSE_IOCTL_MAX_IOV 256
356 359