summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_ioctl32.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ioctl32.c')
-rw-r--r--fs/xfs/xfs_ioctl32.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index 8783af203cfc..24903cbc92db 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -439,7 +439,6 @@ xfs_file_compat_ioctl(
struct inode *inode = file_inode(filp);
struct xfs_inode *ip = XFS_I(inode);
void __user *arg = compat_ptr(p);
- int error;
trace_xfs_file_compat_ioctl(ip);
@@ -460,6 +459,7 @@ xfs_file_compat_ioctl(
return xfs_compat_ioc_fsgeometry_v1(ip->i_mount, arg);
case XFS_IOC_FSGROWFSDATA_32: {
struct xfs_growfs_data in;
+ int error;
if (xfs_compat_growfs_data_copyin(&in, arg))
return -EFAULT;
@@ -472,6 +472,7 @@ xfs_file_compat_ioctl(
}
case XFS_IOC_FSGROWFSRT_32: {
struct xfs_growfs_rt in;
+ int error;
if (xfs_compat_growfs_rt_copyin(&in, arg))
return -EFAULT;
@@ -496,12 +497,8 @@ xfs_file_compat_ioctl(
offsetof(struct xfs_swapext, sx_stat)) ||
xfs_ioctl32_bstat_copyin(&sxp.sx_stat, &sxu->sx_stat))
return -EFAULT;
- error = mnt_want_write_file(filp);
- if (error)
- return error;
- error = xfs_ioc_swapext(&sxp);
- mnt_drop_write_file(filp);
- return error;
+
+ return xfs_ioc_swapext(&sxp);
}
case XFS_IOC_FSBULKSTAT_32:
case XFS_IOC_FSBULKSTAT_SINGLE_32: