From ef1fc2f01e02951a0d8520ec3aa0b38606d74b55 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 27 Jan 2008 17:02:02 -0600 Subject: 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 Signed-off-by: Dave Kleikamp --- fs/jfs/ioctl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'fs/jfs/ioctl.c') diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c index fc82eccf408..a1f8e375ad2 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 -- cgit v1.2.3