| To: | Andrew Morton <akpm@xxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfs: move XFS_IOC_GETVERSION to main multiplexer |
| From: | Alexey Dobriyan <adobriyan@xxxxxxxxx> |
| Date: | Sat, 8 Jul 2006 22:12:52 +0400 |
| Cc: | xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=W9RLWeFjiV9AkMUvYLLpAXfpdAAa9CT9PXXgioyhd+iwxxdtmMf8CY7y2njwqT4vNyUHj2ll1tXSSYIktcrlAr3lmgLxefs9AF4XkqvPNKvFdgq7DgKU+0Egc6yNoNzcjm6ayLo9PdPmH0GVkd6/Cxy71uCzLT4UGNLusGgV2WU= |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.11 |
* Don't do inode => vnode => inode conversion, use passed inode directly
* Don't allocate and free memory on each call
* As a consequence, don't have a chance to return ENOMEM, which would be
truly bizarre error code for this ioctl.
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---
fs/xfs/linux-2.6/xfs_ioctl.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--- 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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | xfsprogs 2.8.4 log_misc.c patch, Craig Rodrigues |
|---|---|
| Next by Date: | Output of mkfs.xfs su/sw values don't match the command line su/sw values, Brian Davis |
| Previous by Thread: | xfsprogs 2.8.4 log_misc.c patch, Craig Rodrigues |
| Next by Thread: | Re: [PATCH] xfs: move XFS_IOC_GETVERSION to main multiplexer, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |