aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-09-27 20:52:04 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 20:52:04 -0400
commitf37ea14969bf85633d3bd29ddf008171a5618855 (patch)
treecba4e7f2de1a24ebf97edae50e264b25b0f64892 /fs/xfs/linux-2.6
parenta77c64c1a641950626181b4857abb701d8f38ccc (diff)
[XFS] pass inode to xfs_ioc_space(), simplify some code. There is trivial
"inode => vnode => inode" conversion, but only flags and mode of final inode are looked at. Pass original inode instead. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26395a 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/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index 6e52a5dd38d8..ed8317fba23c 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -653,7 +653,7 @@ xfs_attrmulti_by_handle(
653STATIC int 653STATIC int
654xfs_ioc_space( 654xfs_ioc_space(
655 bhv_desc_t *bdp, 655 bhv_desc_t *bdp,
656 bhv_vnode_t *vp, 656 struct inode *inode,
657 struct file *filp, 657 struct file *filp,
658 int flags, 658 int flags,
659 unsigned int cmd, 659 unsigned int cmd,
@@ -735,7 +735,7 @@ xfs_ioctl(
735 !capable(CAP_SYS_ADMIN)) 735 !capable(CAP_SYS_ADMIN))
736 return -EPERM; 736 return -EPERM;
737 737
738 return xfs_ioc_space(bdp, vp, filp, ioflags, cmd, arg); 738 return xfs_ioc_space(bdp, inode, filp, ioflags, cmd, arg);
739 739
740 case XFS_IOC_DIOINFO: { 740 case XFS_IOC_DIOINFO: {
741 struct dioattr da; 741 struct dioattr da;
@@ -957,7 +957,7 @@ xfs_ioctl(
957STATIC int 957STATIC int
958xfs_ioc_space( 958xfs_ioc_space(
959 bhv_desc_t *bdp, 959 bhv_desc_t *bdp,
960 bhv_vnode_t *vp, 960 struct inode *inode,
961 struct file *filp, 961 struct file *filp,
962 int ioflags, 962 int ioflags,
963 unsigned int cmd, 963 unsigned int cmd,
@@ -967,13 +967,13 @@ xfs_ioc_space(
967 int attr_flags = 0; 967 int attr_flags = 0;
968 int error; 968 int error;
969 969
970 if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND)) 970 if (inode->i_flags & (S_IMMUTABLE|S_APPEND))
971 return -XFS_ERROR(EPERM); 971 return -XFS_ERROR(EPERM);
972 972
973 if (!(filp->f_mode & FMODE_WRITE)) 973 if (!(filp->f_mode & FMODE_WRITE))
974 return -XFS_ERROR(EBADF); 974 return -XFS_ERROR(EBADF);
975 975
976 if (!VN_ISREG(vp)) 976 if (!S_ISREG(inode->i_mode))
977 return -XFS_ERROR(EINVAL); 977 return -XFS_ERROR(EINVAL);
978 978
979 if (copy_from_user(&bf, arg, sizeof(bf))) 979 if (copy_from_user(&bf, arg, sizeof(bf)))