diff options
-rw-r--r-- | fs/jfs/file.c | 3 | ||||
-rw-r--r-- | fs/jfs/ioctl.c | 18 | ||||
-rw-r--r-- | fs/jfs/jfs_dinode.h | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_inode.h | 1 | ||||
-rw-r--r-- | fs/jfs/namei.c | 3 |
5 files changed, 27 insertions, 0 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c index 713ff4c2f807..7f6063acaa3b 100644 --- a/fs/jfs/file.c +++ b/fs/jfs/file.c | |||
@@ -113,4 +113,7 @@ const struct file_operations jfs_file_operations = { | |||
113 | .fsync = jfs_fsync, | 113 | .fsync = jfs_fsync, |
114 | .release = jfs_release, | 114 | .release = jfs_release, |
115 | .unlocked_ioctl = jfs_ioctl, | 115 | .unlocked_ioctl = jfs_ioctl, |
116 | #ifdef CONFIG_COMPAT | ||
117 | .compat_ioctl = jfs_compat_ioctl, | ||
118 | #endif | ||
116 | }; | 119 | }; |
diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c index fc82eccf408a..a1f8e375ad21 100644 --- a/fs/jfs/ioctl.c +++ b/fs/jfs/ioctl.c | |||
@@ -117,3 +117,21 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | #ifdef CONFIG_COMPAT | ||
121 | long jfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | ||
122 | { | ||
123 | /* While these ioctl numbers defined with 'long' and have different | ||
124 | * numbers than the 64bit ABI, | ||
125 | * the actual implementation only deals with ints and is compatible. | ||
126 | */ | ||
127 | switch (cmd) { | ||
128 | case JFS_IOC_GETFLAGS32: | ||
129 | cmd = JFS_IOC_GETFLAGS; | ||
130 | break; | ||
131 | case JFS_IOC_SETFLAGS32: | ||
132 | cmd = JFS_IOC_SETFLAGS; | ||
133 | break; | ||
134 | } | ||
135 | return jfs_ioctl(filp, cmd, arg); | ||
136 | } | ||
137 | #endif | ||
diff --git a/fs/jfs/jfs_dinode.h b/fs/jfs/jfs_dinode.h index c387540d3425..395c4c0d0f06 100644 --- a/fs/jfs/jfs_dinode.h +++ b/fs/jfs/jfs_dinode.h | |||
@@ -170,5 +170,7 @@ struct dinode { | |||
170 | #define JFS_IOC_GETFLAGS _IOR('f', 1, long) | 170 | #define JFS_IOC_GETFLAGS _IOR('f', 1, long) |
171 | #define JFS_IOC_SETFLAGS _IOW('f', 2, long) | 171 | #define JFS_IOC_SETFLAGS _IOW('f', 2, long) |
172 | 172 | ||
173 | #define JFS_IOC_GETFLAGS32 _IOR('f', 1, int) | ||
174 | #define JFS_IOC_SETFLAGS32 _IOW('f', 2, int) | ||
173 | 175 | ||
174 | #endif /*_H_JFS_DINODE */ | 176 | #endif /*_H_JFS_DINODE */ |
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h index 570fd5e3ef61..adb2fafcc544 100644 --- a/fs/jfs/jfs_inode.h +++ b/fs/jfs/jfs_inode.h | |||
@@ -23,6 +23,7 @@ struct fid; | |||
23 | extern struct inode *ialloc(struct inode *, umode_t); | 23 | extern struct inode *ialloc(struct inode *, umode_t); |
24 | extern int jfs_fsync(struct file *, struct dentry *, int); | 24 | extern int jfs_fsync(struct file *, struct dentry *, int); |
25 | extern long jfs_ioctl(struct file *, unsigned int, unsigned long); | 25 | extern long jfs_ioctl(struct file *, unsigned int, unsigned long); |
26 | extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long); | ||
26 | extern struct inode *jfs_iget(struct super_block *, unsigned long); | 27 | extern struct inode *jfs_iget(struct super_block *, unsigned long); |
27 | extern int jfs_commit_inode(struct inode *, int); | 28 | extern int jfs_commit_inode(struct inode *, int); |
28 | extern int jfs_write_inode(struct inode*, int); | 29 | extern int jfs_write_inode(struct inode*, int); |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 6440904a051c..0ba6778edaa2 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
@@ -1557,6 +1557,9 @@ const struct file_operations jfs_dir_operations = { | |||
1557 | .readdir = jfs_readdir, | 1557 | .readdir = jfs_readdir, |
1558 | .fsync = jfs_fsync, | 1558 | .fsync = jfs_fsync, |
1559 | .unlocked_ioctl = jfs_ioctl, | 1559 | .unlocked_ioctl = jfs_ioctl, |
1560 | #ifdef CONFIG_COMPAT | ||
1561 | .compat_ioctl = jfs_compat_ioctl, | ||
1562 | #endif | ||
1560 | }; | 1563 | }; |
1561 | 1564 | ||
1562 | static int jfs_ci_hash(struct dentry *dir, struct qstr *this) | 1565 | static int jfs_ci_hash(struct dentry *dir, struct qstr *this) |