aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/ioctl.c')
-rw-r--r--fs/ocfs2/ioctl.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index 4768be5f3086..7e59c93751f0 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -134,3 +134,26 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp,
134 } 134 }
135} 135}
136 136
137#ifdef CONFIG_COMPAT
138long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
139{
140 struct inode *inode = file->f_path.dentry->d_inode;
141 int ret;
142
143 switch (cmd) {
144 case OCFS2_IOC32_GETFLAGS:
145 cmd = OCFS2_IOC_GETFLAGS;
146 break;
147 case OCFS2_IOC32_SETFLAGS:
148 cmd = OCFS2_IOC_SETFLAGS;
149 break;
150 default:
151 return -ENOIOCTLCMD;
152 }
153
154 lock_kernel();
155 ret = ocfs2_ioctl(inode, file, cmd, arg);
156 unlock_kernel();
157 return ret;
158}
159#endif