diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 12 | ||||
-rw-r--r-- | fs/reiserfs/dir.c | 3 | ||||
-rw-r--r-- | fs/reiserfs/file.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/ioctl.c | 35 |
4 files changed, 42 insertions, 12 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index bd9c4f49d4e5..0346f2ab57c4 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <linux/pci.h> | 59 | #include <linux/pci.h> |
60 | #include <linux/module.h> | 60 | #include <linux/module.h> |
61 | #include <linux/serial.h> | 61 | #include <linux/serial.h> |
62 | #include <linux/reiserfs_fs.h> | ||
63 | #include <linux/if_tun.h> | 62 | #include <linux/if_tun.h> |
64 | #include <linux/ctype.h> | 63 | #include <linux/ctype.h> |
65 | #include <linux/ioctl32.h> | 64 | #include <linux/ioctl32.h> |
@@ -2014,16 +2013,6 @@ static int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg) | |||
2014 | return ret; | 2013 | return ret; |
2015 | } | 2014 | } |
2016 | 2015 | ||
2017 | #define REISERFS_IOC_UNPACK32 _IOW(0xCD,1,int) | ||
2018 | |||
2019 | static int reiserfs_ioctl32(unsigned fd, unsigned cmd, unsigned long ptr) | ||
2020 | { | ||
2021 | if (cmd == REISERFS_IOC_UNPACK32) | ||
2022 | cmd = REISERFS_IOC_UNPACK; | ||
2023 | |||
2024 | return sys_ioctl(fd,cmd,ptr); | ||
2025 | } | ||
2026 | |||
2027 | struct raw32_config_request | 2016 | struct raw32_config_request |
2028 | { | 2017 | { |
2029 | compat_int_t raw_minor; | 2018 | compat_int_t raw_minor; |
@@ -2784,7 +2773,6 @@ HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64) | |||
2784 | /* vfat */ | 2773 | /* vfat */ |
2785 | HANDLE_IOCTL(VFAT_IOCTL_READDIR_BOTH32, vfat_ioctl32) | 2774 | HANDLE_IOCTL(VFAT_IOCTL_READDIR_BOTH32, vfat_ioctl32) |
2786 | HANDLE_IOCTL(VFAT_IOCTL_READDIR_SHORT32, vfat_ioctl32) | 2775 | HANDLE_IOCTL(VFAT_IOCTL_READDIR_SHORT32, vfat_ioctl32) |
2787 | HANDLE_IOCTL(REISERFS_IOC_UNPACK32, reiserfs_ioctl32) | ||
2788 | /* Raw devices */ | 2776 | /* Raw devices */ |
2789 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) | 2777 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) |
2790 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) | 2778 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) |
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 9aabcc0ccd2d..657050ad7430 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c | |||
@@ -22,6 +22,9 @@ const struct file_operations reiserfs_dir_operations = { | |||
22 | .readdir = reiserfs_readdir, | 22 | .readdir = reiserfs_readdir, |
23 | .fsync = reiserfs_dir_fsync, | 23 | .fsync = reiserfs_dir_fsync, |
24 | .ioctl = reiserfs_ioctl, | 24 | .ioctl = reiserfs_ioctl, |
25 | #ifdef CONFIG_COMPAT | ||
26 | .compat_ioctl = reiserfs_compat_ioctl, | ||
27 | #endif | ||
25 | }; | 28 | }; |
26 | 29 | ||
27 | static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, | 30 | static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, |
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 1cfbe857ba27..3e08f7161a3d 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README | 2 | * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
5 | #include <linux/time.h> | 6 | #include <linux/time.h> |
6 | #include <linux/reiserfs_fs.h> | 7 | #include <linux/reiserfs_fs.h> |
7 | #include <linux/reiserfs_acl.h> | 8 | #include <linux/reiserfs_acl.h> |
@@ -1568,6 +1569,9 @@ const struct file_operations reiserfs_file_operations = { | |||
1568 | .read = generic_file_read, | 1569 | .read = generic_file_read, |
1569 | .write = reiserfs_file_write, | 1570 | .write = reiserfs_file_write, |
1570 | .ioctl = reiserfs_ioctl, | 1571 | .ioctl = reiserfs_ioctl, |
1572 | #ifdef CONFIG_COMPAT | ||
1573 | .compat_ioctl = reiserfs_compat_ioctl, | ||
1574 | #endif | ||
1571 | .mmap = generic_file_mmap, | 1575 | .mmap = generic_file_mmap, |
1572 | .release = reiserfs_file_release, | 1576 | .release = reiserfs_file_release, |
1573 | .fsync = reiserfs_sync_file, | 1577 | .fsync = reiserfs_sync_file, |
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index a986b5e1e288..9c57578cb831 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
10 | #include <linux/pagemap.h> | 10 | #include <linux/pagemap.h> |
11 | #include <linux/smp_lock.h> | 11 | #include <linux/smp_lock.h> |
12 | #include <linux/compat.h> | ||
12 | 13 | ||
13 | static int reiserfs_unpack(struct inode *inode, struct file *filp); | 14 | static int reiserfs_unpack(struct inode *inode, struct file *filp); |
14 | 15 | ||
@@ -94,6 +95,40 @@ int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
94 | } | 95 | } |
95 | } | 96 | } |
96 | 97 | ||
98 | #ifdef CONFIG_COMPAT | ||
99 | long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, | ||
100 | unsigned long arg) | ||
101 | { | ||
102 | struct inode *inode = file->f_dentry->d_inode; | ||
103 | int ret; | ||
104 | |||
105 | /* These are just misnamed, they actually get/put from/to user an int */ | ||
106 | switch (cmd) { | ||
107 | case REISERFS_IOC32_UNPACK: | ||
108 | cmd = REISERFS_IOC_UNPACK; | ||
109 | break; | ||
110 | case REISERFS_IOC32_GETFLAGS: | ||
111 | cmd = REISERFS_IOC_GETFLAGS; | ||
112 | break; | ||
113 | case REISERFS_IOC32_SETFLAGS: | ||
114 | cmd = REISERFS_IOC_SETFLAGS; | ||
115 | break; | ||
116 | case REISERFS_IOC32_GETVERSION: | ||
117 | cmd = REISERFS_IOC_GETVERSION; | ||
118 | break; | ||
119 | case REISERFS_IOC32_SETVERSION: | ||
120 | cmd = REISERFS_IOC_SETVERSION; | ||
121 | break; | ||
122 | default: | ||
123 | return -ENOIOCTLCMD; | ||
124 | } | ||
125 | lock_kernel(); | ||
126 | ret = reiserfs_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg)); | ||
127 | unlock_kernel(); | ||
128 | return ret; | ||
129 | } | ||
130 | #endif | ||
131 | |||
97 | /* | 132 | /* |
98 | ** reiserfs_unpack | 133 | ** reiserfs_unpack |
99 | ** Function try to convert tail from direct item into indirect. | 134 | ** Function try to convert tail from direct item into indirect. |