diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-09-28 10:56:01 +1000 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2006-09-28 10:56:01 +1000 |
commit | 87395deb0b3d174ffcc7f66569764f0715ac5174 (patch) | |
tree | 40a3f1372fd2df70a7033ee10efa33f76d0a7aff /fs/xfs | |
parent | 128dabc5e9aa13dfebcad84e6b4ab31078555131 (diff) |
[XFS] move XFS_IOC_GETVERSION to main multiplexer
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index ed8317fba23..a74f854d91e 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -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; |