]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_ioctl32.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_ioctl32.c
index 83f5099603050f2bfdd0228a578fb8c46339fab8..a4b254eb43b2ec74151ada8ffb1e9fc2dd41cfab 100644 (file)
@@ -44,6 +44,7 @@
 #include "xfs_error.h"
 #include "xfs_dfrag.h"
 #include "xfs_vnodeops.h"
+#include "xfs_ioctl32.h"
 
 #define  _NATIVE_IOC(cmd, type) \
          _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type))
@@ -291,6 +292,9 @@ xfs_ioc_bulkstat_compat(
        if ((count = bulkreq.icount) <= 0)
                return -XFS_ERROR(EINVAL);
 
+       if (bulkreq.ubuffer == NULL)
+               return -XFS_ERROR(EINVAL);
+
        if (cmd == XFS_IOC_FSINUMBERS)
                error = xfs_inumbers(mp, &inlast, &count,
                                bulkreq.ubuffer, xfs_inumbers_fmt_compat);
@@ -371,15 +375,11 @@ xfs_compat_ioctl(
        unsigned long   arg)
 {
        struct inode    *inode = file->f_path.dentry->d_inode;
-       bhv_vnode_t     *vp = vn_from_inode(inode);
        int             error;
 
        switch (cmd) {
        case XFS_IOC_DIOINFO:
        case XFS_IOC_FSGEOMETRY:
-       case XFS_IOC_GETVERSION:
-       case XFS_IOC_GETXFLAGS:
-       case XFS_IOC_SETXFLAGS:
        case XFS_IOC_FSGETXATTR:
        case XFS_IOC_FSSETXATTR:
        case XFS_IOC_FSGETXATTRA:
@@ -405,6 +405,11 @@ xfs_compat_ioctl(
        case XFS_IOC_ERROR_CLEARALL:
                break;
 
+       case XFS_IOC32_GETXFLAGS:
+       case XFS_IOC32_SETXFLAGS:
+       case XFS_IOC32_GETVERSION:
+               cmd = _NATIVE_IOC(cmd, long);
+               break;
 #ifdef BROKEN_X86_ALIGNMENT
        /* xfs_flock_t has wrong u32 vs u64 alignment */
        case XFS_IOC_ALLOCSP_32:
@@ -459,7 +464,7 @@ xfs_compat_ioctl(
        }
 
        error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg);
-       VMODIFY(vp);
+       xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);
 
        return error;
 }