Commit 87395deb authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Tim Shimmin

[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: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
Signed-off-by: default avatarTim Shimmin <tes@sgi.com>
parent 128dabc5
...@@ -763,6 +763,8 @@ xfs_ioctl( ...@@ -763,6 +763,8 @@ xfs_ioctl(
return xfs_ioc_fsgeometry(mp, arg); return xfs_ioc_fsgeometry(mp, arg);
case XFS_IOC_GETVERSION: case XFS_IOC_GETVERSION:
return put_user(inode->i_generation, (int __user *)arg);
case XFS_IOC_GETXFLAGS: case XFS_IOC_GETXFLAGS:
case XFS_IOC_SETXFLAGS: case XFS_IOC_SETXFLAGS:
case XFS_IOC_FSGETXATTR: case XFS_IOC_FSGETXATTR:
...@@ -1264,13 +1266,6 @@ xfs_ioc_xattr( ...@@ -1264,13 +1266,6 @@ xfs_ioc_xattr(
break; break;
} }
case XFS_IOC_GETVERSION: {
flags = vn_to_inode(vp)->i_generation;
if (copy_to_user(arg, &flags, sizeof(flags)))
error = -EFAULT;
break;
}
default: default:
error = -ENOTTY; error = -ENOTTY;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment