diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 10 |
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 6e52a5dd38d..ed8317fba23 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( | |||
653 | STATIC int | 653 | STATIC int |
654 | xfs_ioc_space( | 654 | xfs_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( | |||
957 | STATIC int | 957 | STATIC int |
958 | xfs_ioc_space( | 958 | xfs_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))) |