]> err.no Git - linux-2.6/commitdiff
[XFS] move XFS_IOC_GETVERSION to main multiplexer
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 28 Sep 2006 00:56:01 +0000 (10:56 +1000)
committerTim Shimmin <tes@sgi.com>
Thu, 28 Sep 2006 00:56:01 +0000 (10:56 +1000)
Avoids doing an unnecessary inode to vnode conversion and avoids a memory
allocation.

SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:26492a

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/linux-2.6/xfs_ioctl.c

index ed8317fba23ce0d1308f14a09225cd0b016b4179..a74f854d91e6afe1d86ba2da278a733a5afa48e5 100644 (file)
@@ -763,6 +763,8 @@ xfs_ioctl(
                return xfs_ioc_fsgeometry(mp, arg);
 
        case XFS_IOC_GETVERSION:
+               return put_user(inode->i_generation, (int __user *)arg);
+
        case XFS_IOC_GETXFLAGS:
        case XFS_IOC_SETXFLAGS:
        case XFS_IOC_FSGETXATTR:
@@ -1264,13 +1266,6 @@ xfs_ioc_xattr(
                break;
        }
 
-       case XFS_IOC_GETVERSION: {
-               flags = vn_to_inode(vp)->i_generation;
-               if (copy_to_user(arg, &flags, sizeof(flags)))
-                       error = -EFAULT;
-               break;
-       }
-
        default:
                error = -ENOTTY;
                break;