diff options
Diffstat (limited to 'fs/xfs/xfs_ioctl32.c')
-rw-r--r-- | fs/xfs/xfs_ioctl32.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c index c4f2da0d2bf5..1244274a5674 100644 --- a/fs/xfs/xfs_ioctl32.c +++ b/fs/xfs/xfs_ioctl32.c | |||
@@ -600,7 +600,11 @@ xfs_file_compat_ioctl( | |||
600 | 600 | ||
601 | if (xfs_compat_growfs_data_copyin(&in, arg)) | 601 | if (xfs_compat_growfs_data_copyin(&in, arg)) |
602 | return -XFS_ERROR(EFAULT); | 602 | return -XFS_ERROR(EFAULT); |
603 | error = mnt_want_write_file(filp); | ||
604 | if (error) | ||
605 | return error; | ||
603 | error = xfs_growfs_data(mp, &in); | 606 | error = xfs_growfs_data(mp, &in); |
607 | mnt_drop_write_file(filp); | ||
604 | return -error; | 608 | return -error; |
605 | } | 609 | } |
606 | case XFS_IOC_FSGROWFSRT_32: { | 610 | case XFS_IOC_FSGROWFSRT_32: { |
@@ -608,7 +612,11 @@ xfs_file_compat_ioctl( | |||
608 | 612 | ||
609 | if (xfs_compat_growfs_rt_copyin(&in, arg)) | 613 | if (xfs_compat_growfs_rt_copyin(&in, arg)) |
610 | return -XFS_ERROR(EFAULT); | 614 | return -XFS_ERROR(EFAULT); |
615 | error = mnt_want_write_file(filp); | ||
616 | if (error) | ||
617 | return error; | ||
611 | error = xfs_growfs_rt(mp, &in); | 618 | error = xfs_growfs_rt(mp, &in); |
619 | mnt_drop_write_file(filp); | ||
612 | return -error; | 620 | return -error; |
613 | } | 621 | } |
614 | #endif | 622 | #endif |
@@ -627,7 +635,11 @@ xfs_file_compat_ioctl( | |||
627 | offsetof(struct xfs_swapext, sx_stat)) || | 635 | offsetof(struct xfs_swapext, sx_stat)) || |
628 | xfs_ioctl32_bstat_copyin(&sxp.sx_stat, &sxu->sx_stat)) | 636 | xfs_ioctl32_bstat_copyin(&sxp.sx_stat, &sxu->sx_stat)) |
629 | return -XFS_ERROR(EFAULT); | 637 | return -XFS_ERROR(EFAULT); |
638 | error = mnt_want_write_file(filp); | ||
639 | if (error) | ||
640 | return error; | ||
630 | error = xfs_swapext(&sxp); | 641 | error = xfs_swapext(&sxp); |
642 | mnt_drop_write_file(filp); | ||
631 | return -error; | 643 | return -error; |
632 | } | 644 | } |
633 | case XFS_IOC_FSBULKSTAT_32: | 645 | case XFS_IOC_FSBULKSTAT_32: |