summaryrefslogtreecommitdiffstats
path: root/fs/jfs/ioctl.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2008-01-27 17:02:02 -0600
committerDave Kleikamp <shaggy@linux.vnet.ibm.com>2008-02-07 13:45:29 -0600
commitef1fc2f01e02951a0d8520ec3aa0b38606d74b55 (patch)
tree463a76f46af50169643ed5c1f5c7a6060e26bbaa /fs/jfs/ioctl.c
parentbaab81fa518ecfac597402b462631f5593926623 (diff)
downloadlinux-ef1fc2f01e02951a0d8520ec3aa0b38606d74b55.tar.gz
linux-ef1fc2f01e02951a0d8520ec3aa0b38606d74b55.tar.bz2
linux-ef1fc2f01e02951a0d8520ec3aa0b38606d74b55.zip
BKL-removal: Implement a compat_ioctl handler for JFS
The ioctls were already compatible except for the actual values so this was fairly easy to do. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Diffstat (limited to 'fs/jfs/ioctl.c')
-rw-r--r--fs/jfs/ioctl.c18
1 files changed, 18 insertions, 0 deletions
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)
}
}
+#ifdef CONFIG_COMPAT
+long jfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ /* While these ioctl numbers defined with 'long' and have different
+ * numbers than the 64bit ABI,
+ * the actual implementation only deals with ints and is compatible.
+ */
+ switch (cmd) {
+ case JFS_IOC_GETFLAGS32:
+ cmd = JFS_IOC_GETFLAGS;
+ break;
+ case JFS_IOC_SETFLAGS32:
+ cmd = JFS_IOC_SETFLAGS;
+ break;
+ }
+ return jfs_ioctl(filp, cmd, arg);
+}
+#endif