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.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index 4768be5f3086..f3ad21ad9aed 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -31,6 +31,7 @@ static int ocfs2_get_inode_attr(struct inode *inode, unsigned *flags)
31 mlog_errno(status); 31 mlog_errno(status);
32 return status; 32 return status;
33 } 33 }
34 ocfs2_get_inode_flags(OCFS2_I(inode));
34 *flags = OCFS2_I(inode)->ip_attr; 35 *flags = OCFS2_I(inode)->ip_attr;
35 ocfs2_meta_unlock(inode, 0); 36 ocfs2_meta_unlock(inode, 0);
36 37
@@ -134,3 +135,26 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp,
134 } 135 }
135} 136}
136 137
138#ifdef CONFIG_COMPAT
139long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
140{
141 struct inode *inode = file->f_path.dentry->d_inode;
142 int ret;
143
144 switch (cmd) {
145 case OCFS2_IOC32_GETFLAGS:
146 cmd = OCFS2_IOC_GETFLAGS;
147 break;
148 case OCFS2_IOC32_SETFLAGS:
149 cmd = OCFS2_IOC_SETFLAGS;
150 break;
151 default:
152 return -ENOIOCTLCMD;
153 }
154
155 lock_kernel();
156 ret = ocfs2_ioctl(inode, file, cmd, arg);
157 unlock_kernel();
158 return ret;
159}
160#endif