blob: 35edc054fb9927e9d85c4b4a0c7011a1d2b820fe [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2004-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#include <linux/compat.h>
19#include <linux/init.h>
20#include <linux/ioctl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <linux/syscalls.h>
22#include <linux/types.h>
23#include <linux/fs.h>
24#include <asm/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#include "xfs.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#include "xfs_fs.h"
Michal Marekfaa63e92007-07-11 11:10:19 +100027#include "xfs_bit.h"
28#include "xfs_log.h"
29#include "xfs_inum.h"
30#include "xfs_trans.h"
31#include "xfs_sb.h"
32#include "xfs_ag.h"
33#include "xfs_dir2.h"
34#include "xfs_dmapi.h"
35#include "xfs_mount.h"
36#include "xfs_bmap_btree.h"
37#include "xfs_attr_sf.h"
38#include "xfs_dir2_sf.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070039#include "xfs_vnode.h"
Michal Marekfaa63e92007-07-11 11:10:19 +100040#include "xfs_dinode.h"
41#include "xfs_inode.h"
42#include "xfs_itable.h"
43#include "xfs_error.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#include "xfs_dfrag.h"
Christoph Hellwig739bfb22007-08-29 10:58:01 +100045#include "xfs_vnodeops.h"
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060046#include "xfs_fsops.h"
47#include "xfs_ioctl.h"
David Chinnera8272ce2007-11-23 16:28:09 +110048#include "xfs_ioctl32.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070049
Eric Sandeen526c4202005-09-05 08:25:06 +100050#define _NATIVE_IOC(cmd, type) \
51 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type))
52
sandeen@sandeen.netffae2632008-11-25 21:20:07 -060053#ifdef BROKEN_X86_ALIGNMENT
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060054STATIC int
55xfs_compat_flock64_copyin(
56 xfs_flock64_t *bf,
57 compat_xfs_flock64_t __user *arg32)
Eric Sandeen526c4202005-09-05 08:25:06 +100058{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060059 if (get_user(bf->l_type, &arg32->l_type) ||
60 get_user(bf->l_whence, &arg32->l_whence) ||
61 get_user(bf->l_start, &arg32->l_start) ||
62 get_user(bf->l_len, &arg32->l_len) ||
63 get_user(bf->l_sysid, &arg32->l_sysid) ||
64 get_user(bf->l_pid, &arg32->l_pid) ||
65 copy_from_user(bf->l_pad, &arg32->l_pad, 4*sizeof(u32)))
66 return -XFS_ERROR(EFAULT);
67 return 0;
Eric Sandeen526c4202005-09-05 08:25:06 +100068}
69
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060070STATIC int
71xfs_compat_ioc_fsgeometry_v1(
72 struct xfs_mount *mp,
73 compat_xfs_fsop_geom_v1_t __user *arg32)
Michal Marek547e00c2007-07-11 11:09:57 +100074{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060075 xfs_fsop_geom_t fsgeo;
76 int error;
Michal Marek547e00c2007-07-11 11:09:57 +100077
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060078 error = xfs_fs_geometry(mp, &fsgeo, 3);
79 if (error)
80 return -error;
81 /* The 32-bit variant simply has some padding at the end */
82 if (copy_to_user(arg32, &fsgeo, sizeof(struct compat_xfs_fsop_geom_v1)))
83 return -XFS_ERROR(EFAULT);
84 return 0;
Michal Marek547e00c2007-07-11 11:09:57 +100085}
86
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060087STATIC int
88xfs_inumbers_fmt_compat(
89 void __user *ubuffer,
90 const xfs_inogrp_t *buffer,
91 long count,
92 long *written)
Michal Marekfaa63e92007-07-11 11:10:19 +100093{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060094 compat_xfs_inogrp_t __user *p32 = ubuffer;
95 long i;
Michal Marekfaa63e92007-07-11 11:10:19 +100096
97 for (i = 0; i < count; i++) {
98 if (put_user(buffer[i].xi_startino, &p32[i].xi_startino) ||
99 put_user(buffer[i].xi_alloccount, &p32[i].xi_alloccount) ||
100 put_user(buffer[i].xi_allocmask, &p32[i].xi_allocmask))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600101 return -XFS_ERROR(EFAULT);
Michal Marekfaa63e92007-07-11 11:10:19 +1000102 }
103 *written = count * sizeof(*p32);
104 return 0;
105}
106
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107#else
Michal Marekfaa63e92007-07-11 11:10:19 +1000108#define xfs_inumbers_fmt_compat xfs_inumbers_fmt
Michal Marekfaa63e92007-07-11 11:10:19 +1000109#endif
110
111/* XFS_IOC_FSBULKSTAT and friends */
112
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600113STATIC int
114xfs_bstime_store_compat(
115 compat_xfs_bstime_t __user *p32,
116 const xfs_bstime_t *p)
Michal Marekfaa63e92007-07-11 11:10:19 +1000117{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600118 __s32 sec32;
Michal Marekfaa63e92007-07-11 11:10:19 +1000119
120 sec32 = p->tv_sec;
121 if (put_user(sec32, &p32->tv_sec) ||
122 put_user(p->tv_nsec, &p32->tv_nsec))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600123 return -XFS_ERROR(EFAULT);
Michal Marekfaa63e92007-07-11 11:10:19 +1000124 return 0;
125}
126
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600127STATIC int
128xfs_bulkstat_one_fmt_compat(
Michal Marekfaa63e92007-07-11 11:10:19 +1000129 void __user *ubuffer,
130 const xfs_bstat_t *buffer)
131{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600132 compat_xfs_bstat_t __user *p32 = ubuffer;
Michal Marekfaa63e92007-07-11 11:10:19 +1000133
134 if (put_user(buffer->bs_ino, &p32->bs_ino) ||
135 put_user(buffer->bs_mode, &p32->bs_mode) ||
136 put_user(buffer->bs_nlink, &p32->bs_nlink) ||
137 put_user(buffer->bs_uid, &p32->bs_uid) ||
138 put_user(buffer->bs_gid, &p32->bs_gid) ||
139 put_user(buffer->bs_rdev, &p32->bs_rdev) ||
140 put_user(buffer->bs_blksize, &p32->bs_blksize) ||
141 put_user(buffer->bs_size, &p32->bs_size) ||
142 xfs_bstime_store_compat(&p32->bs_atime, &buffer->bs_atime) ||
143 xfs_bstime_store_compat(&p32->bs_mtime, &buffer->bs_mtime) ||
144 xfs_bstime_store_compat(&p32->bs_ctime, &buffer->bs_ctime) ||
145 put_user(buffer->bs_blocks, &p32->bs_blocks) ||
146 put_user(buffer->bs_xflags, &p32->bs_xflags) ||
147 put_user(buffer->bs_extsize, &p32->bs_extsize) ||
148 put_user(buffer->bs_extents, &p32->bs_extents) ||
149 put_user(buffer->bs_gen, &p32->bs_gen) ||
150 put_user(buffer->bs_projid, &p32->bs_projid) ||
151 put_user(buffer->bs_dmevmask, &p32->bs_dmevmask) ||
152 put_user(buffer->bs_dmstate, &p32->bs_dmstate) ||
153 put_user(buffer->bs_aextents, &p32->bs_aextents))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600154 return -XFS_ERROR(EFAULT);
Michal Marekfaa63e92007-07-11 11:10:19 +1000155 return sizeof(*p32);
156}
157
Michal Marekfaa63e92007-07-11 11:10:19 +1000158/* copied from xfs_ioctl.c */
159STATIC int
160xfs_ioc_bulkstat_compat(
161 xfs_mount_t *mp,
162 unsigned int cmd,
163 void __user *arg)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164{
Michal Marekfaa63e92007-07-11 11:10:19 +1000165 compat_xfs_fsop_bulkreq_t __user *p32 = (void __user *)arg;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166 u32 addr;
Michal Marekfaa63e92007-07-11 11:10:19 +1000167 xfs_fsop_bulkreq_t bulkreq;
168 int count; /* # of records returned */
169 xfs_ino_t inlast; /* last inode number */
170 int done;
171 int error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172
Michal Marekfaa63e92007-07-11 11:10:19 +1000173 /* done = 1 if there are more stats to get and if bulkstat */
174 /* should be called again (unused here, but used in dmapi) */
175
176 if (!capable(CAP_SYS_ADMIN))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600177 return -XFS_ERROR(EPERM);
Michal Marekfaa63e92007-07-11 11:10:19 +1000178
179 if (XFS_FORCED_SHUTDOWN(mp))
180 return -XFS_ERROR(EIO);
181
182 if (get_user(addr, &p32->lastip))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600183 return -XFS_ERROR(EFAULT);
Michal Marekfaa63e92007-07-11 11:10:19 +1000184 bulkreq.lastip = compat_ptr(addr);
185 if (get_user(bulkreq.icount, &p32->icount) ||
186 get_user(addr, &p32->ubuffer))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600187 return -XFS_ERROR(EFAULT);
Michal Marekfaa63e92007-07-11 11:10:19 +1000188 bulkreq.ubuffer = compat_ptr(addr);
189 if (get_user(addr, &p32->ocount))
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600190 return -XFS_ERROR(EFAULT);
Michal Marekfaa63e92007-07-11 11:10:19 +1000191 bulkreq.ocount = compat_ptr(addr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192
Michal Marekfaa63e92007-07-11 11:10:19 +1000193 if (copy_from_user(&inlast, bulkreq.lastip, sizeof(__s64)))
194 return -XFS_ERROR(EFAULT);
195
196 if ((count = bulkreq.icount) <= 0)
197 return -XFS_ERROR(EINVAL);
198
Lachlan McIlroycd57e592007-11-23 16:30:32 +1100199 if (bulkreq.ubuffer == NULL)
200 return -XFS_ERROR(EINVAL);
201
Michal Marekfaa63e92007-07-11 11:10:19 +1000202 if (cmd == XFS_IOC_FSINUMBERS)
203 error = xfs_inumbers(mp, &inlast, &count,
204 bulkreq.ubuffer, xfs_inumbers_fmt_compat);
205 else {
206 /* declare a var to get a warning in case the type changes */
207 bulkstat_one_fmt_pf formatter = xfs_bulkstat_one_fmt_compat;
208 error = xfs_bulkstat(mp, &inlast, &count,
209 xfs_bulkstat_one, formatter,
210 sizeof(compat_xfs_bstat_t), bulkreq.ubuffer,
211 BULKSTAT_FG_QUICK, &done);
212 }
213 if (error)
214 return -error;
215
216 if (bulkreq.ocount != NULL) {
217 if (copy_to_user(bulkreq.lastip, &inlast,
218 sizeof(xfs_ino_t)))
219 return -XFS_ERROR(EFAULT);
220
221 if (copy_to_user(bulkreq.ocount, &count, sizeof(count)))
222 return -XFS_ERROR(EFAULT);
223 }
224
225 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226}
Michal Marekfaa63e92007-07-11 11:10:19 +1000227
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600228STATIC int
229xfs_compat_handlereq_copyin(
230 xfs_fsop_handlereq_t *hreq,
231 compat_xfs_fsop_handlereq_t __user *arg32)
Michal Marek1fa503d2007-07-11 11:10:09 +1000232{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600233 compat_xfs_fsop_handlereq_t hreq32;
Michal Marek1fa503d2007-07-11 11:10:09 +1000234
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600235 if (copy_from_user(&hreq32, arg32, sizeof(compat_xfs_fsop_handlereq_t)))
236 return -XFS_ERROR(EFAULT);
Michal Marek1fa503d2007-07-11 11:10:09 +1000237
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600238 hreq->fd = hreq32.fd;
239 hreq->path = compat_ptr(hreq32.path);
240 hreq->oflags = hreq32.oflags;
241 hreq->ihandle = compat_ptr(hreq32.ihandle);
242 hreq->ihandlen = hreq32.ihandlen;
243 hreq->ohandle = compat_ptr(hreq32.ohandle);
244 hreq->ohandlen = compat_ptr(hreq32.ohandlen);
245
246 return 0;
Michal Marek1fa503d2007-07-11 11:10:09 +1000247}
248
Nathan Scottd3870392005-05-06 06:44:46 -0700249STATIC long
Nathan Scotte0edd592006-03-29 08:55:47 +1000250xfs_compat_ioctl(
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600251 xfs_inode_t *ip,
252 struct file *filp,
253 int ioflags,
Nathan Scotte0edd592006-03-29 08:55:47 +1000254 unsigned cmd,
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600255 void __user *arg)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600257 struct inode *inode = filp->f_path.dentry->d_inode;
258 xfs_mount_t *mp = ip->i_mount;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700259 int error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700260
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600261 xfs_itrace_entry(XFS_I(inode));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700262 switch (cmd) {
263 case XFS_IOC_DIOINFO:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700264 case XFS_IOC_FSGEOMETRY:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265 case XFS_IOC_FSGETXATTR:
266 case XFS_IOC_FSSETXATTR:
267 case XFS_IOC_FSGETXATTRA:
268 case XFS_IOC_FSSETDM:
269 case XFS_IOC_GETBMAP:
270 case XFS_IOC_GETBMAPA:
271 case XFS_IOC_GETBMAPX:
272/* not handled
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273 case XFS_IOC_FSSETDM_BY_HANDLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700274 case XFS_IOC_ATTRLIST_BY_HANDLE:
275 case XFS_IOC_ATTRMULTI_BY_HANDLE:
276*/
277 case XFS_IOC_FSCOUNTS:
278 case XFS_IOC_SET_RESBLKS:
279 case XFS_IOC_GET_RESBLKS:
280 case XFS_IOC_FSGROWFSDATA:
281 case XFS_IOC_FSGROWFSLOG:
282 case XFS_IOC_FSGROWFSRT:
283 case XFS_IOC_FREEZE:
284 case XFS_IOC_THAW:
285 case XFS_IOC_GOINGDOWN:
286 case XFS_IOC_ERROR_INJECTION:
287 case XFS_IOC_ERROR_CLEARALL:
288 break;
289
sandeen@sandeen.netffae2632008-11-25 21:20:07 -0600290 case XFS_IOC_GETXFLAGS_32:
291 case XFS_IOC_SETXFLAGS_32:
292 case XFS_IOC_GETVERSION_32:
Eric Sandeenbc58f9b2007-10-12 11:13:22 +1000293 cmd = _NATIVE_IOC(cmd, long);
294 break;
Eric Sandeen526c4202005-09-05 08:25:06 +1000295#ifdef BROKEN_X86_ALIGNMENT
296 /* xfs_flock_t has wrong u32 vs u64 alignment */
297 case XFS_IOC_ALLOCSP_32:
298 case XFS_IOC_FREESP_32:
299 case XFS_IOC_ALLOCSP64_32:
300 case XFS_IOC_FREESP64_32:
301 case XFS_IOC_RESVSP_32:
302 case XFS_IOC_UNRESVSP_32:
303 case XFS_IOC_RESVSP64_32:
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600304 case XFS_IOC_UNRESVSP64_32: {
305 struct xfs_flock64 bf;
306
307 if (xfs_compat_flock64_copyin(&bf, arg))
308 return -XFS_ERROR(EFAULT);
Eric Sandeen526c4202005-09-05 08:25:06 +1000309 cmd = _NATIVE_IOC(cmd, struct xfs_flock64);
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600310 return xfs_ioc_space(ip, inode, filp, ioflags, cmd, &bf);
311 }
Michal Marek547e00c2007-07-11 11:09:57 +1000312 case XFS_IOC_FSGEOMETRY_V1_32:
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600313 return xfs_compat_ioc_fsgeometry_v1(mp, arg);
Eric Sandeen526c4202005-09-05 08:25:06 +1000314#else /* These are handled fine if no alignment issues */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315 case XFS_IOC_ALLOCSP:
316 case XFS_IOC_FREESP:
317 case XFS_IOC_RESVSP:
318 case XFS_IOC_UNRESVSP:
319 case XFS_IOC_ALLOCSP64:
320 case XFS_IOC_FREESP64:
321 case XFS_IOC_RESVSP64:
322 case XFS_IOC_UNRESVSP64:
Michal Marek547e00c2007-07-11 11:09:57 +1000323 case XFS_IOC_FSGEOMETRY_V1:
Eric Sandeen526c4202005-09-05 08:25:06 +1000324 break;
325
326 /* xfs_bstat_t still has wrong u32 vs u64 alignment */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327 case XFS_IOC_SWAPEXT:
328 break;
329
Linus Torvalds1da177e2005-04-16 15:20:36 -0700330#endif
Michal Marekfaa63e92007-07-11 11:10:19 +1000331 case XFS_IOC_FSBULKSTAT_32:
332 case XFS_IOC_FSBULKSTAT_SINGLE_32:
333 case XFS_IOC_FSINUMBERS_32:
334 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_bulkreq);
Christoph Hellwig739bfb22007-08-29 10:58:01 +1000335 return xfs_ioc_bulkstat_compat(XFS_I(inode)->i_mount,
Al Viroad690ef2007-07-26 17:35:59 +0100336 cmd, (void __user*)arg);
Michal Marek1fa503d2007-07-11 11:10:09 +1000337 case XFS_IOC_FD_TO_HANDLE_32:
338 case XFS_IOC_PATH_TO_HANDLE_32:
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600339 case XFS_IOC_PATH_TO_FSHANDLE_32: {
340 struct xfs_fsop_handlereq hreq;
341
342 if (xfs_compat_handlereq_copyin(&hreq, arg))
343 return -XFS_ERROR(EFAULT);
Michal Marek1fa503d2007-07-11 11:10:09 +1000344 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_handlereq);
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600345 return xfs_find_handle(cmd, &hreq);
346 }
347 case XFS_IOC_OPEN_BY_HANDLE_32: {
348 struct xfs_fsop_handlereq hreq;
349
350 if (xfs_compat_handlereq_copyin(&hreq, arg))
351 return -XFS_ERROR(EFAULT);
352 return xfs_open_by_handle(mp, &hreq, filp, inode);
353 }
354 case XFS_IOC_READLINK_BY_HANDLE_32: {
355 struct xfs_fsop_handlereq hreq;
356
357 if (xfs_compat_handlereq_copyin(&hreq, arg))
358 return -XFS_ERROR(EFAULT);
359 return xfs_readlink_by_handle(mp, &hreq, inode);
360 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700361 default:
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600362 return -XFS_ERROR(ENOIOCTLCMD);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363 }
364
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600365 error = xfs_ioctl(ip, filp, ioflags, cmd, arg);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700366 return error;
367}
368
Nathan Scottd3870392005-05-06 06:44:46 -0700369long
Nathan Scotta50cd262006-03-14 14:06:18 +1100370xfs_file_compat_ioctl(
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600371 struct file *filp,
372 unsigned int cmd,
373 unsigned long p)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700374{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600375 struct inode *inode = filp->f_path.dentry->d_inode;
376
377 return xfs_compat_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700378}
379
Nathan Scottd3870392005-05-06 06:44:46 -0700380long
Nathan Scotta50cd262006-03-14 14:06:18 +1100381xfs_file_compat_invis_ioctl(
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600382 struct file *filp,
383 unsigned int cmd,
384 unsigned long p)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700385{
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -0600386 struct inode *inode = filp->f_path.dentry->d_inode;
387
388 return xfs_compat_ioctl(XFS_I(inode), filp, IO_INVIS, cmd,
389 (void __user *)p);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700390}