diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl32.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl32.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 132f3dd2c7e8..d1ac5d5c009b 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -44,6 +44,8 @@ | |||
44 | #include "xfs_dfrag.h" | 44 | #include "xfs_dfrag.h" |
45 | #include "xfs_vnodeops.h" | 45 | #include "xfs_vnodeops.h" |
46 | #include "xfs_fsops.h" | 46 | #include "xfs_fsops.h" |
47 | #include "xfs_alloc.h" | ||
48 | #include "xfs_rtalloc.h" | ||
47 | #include "xfs_ioctl.h" | 49 | #include "xfs_ioctl.h" |
48 | #include "xfs_ioctl32.h" | 50 | #include "xfs_ioctl32.h" |
49 | 51 | ||
@@ -85,6 +87,28 @@ xfs_compat_ioc_fsgeometry_v1( | |||
85 | } | 87 | } |
86 | 88 | ||
87 | STATIC int | 89 | STATIC int |
90 | xfs_compat_growfs_data_copyin( | ||
91 | struct xfs_growfs_data *in, | ||
92 | compat_xfs_growfs_data_t __user *arg32) | ||
93 | { | ||
94 | if (get_user(in->newblocks, &arg32->newblocks) || | ||
95 | get_user(in->imaxpct, &arg32->imaxpct)) | ||
96 | return -XFS_ERROR(EFAULT); | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | STATIC int | ||
101 | xfs_compat_growfs_rt_copyin( | ||
102 | struct xfs_growfs_rt *in, | ||
103 | compat_xfs_growfs_rt_t __user *arg32) | ||
104 | { | ||
105 | if (get_user(in->newblocks, &arg32->newblocks) || | ||
106 | get_user(in->extsize, &arg32->extsize)) | ||
107 | return -XFS_ERROR(EFAULT); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | STATIC int | ||
88 | xfs_inumbers_fmt_compat( | 112 | xfs_inumbers_fmt_compat( |
89 | void __user *ubuffer, | 113 | void __user *ubuffer, |
90 | const xfs_inogrp_t *buffer, | 114 | const xfs_inogrp_t *buffer, |
@@ -367,6 +391,22 @@ xfs_compat_ioctl( | |||
367 | } | 391 | } |
368 | case XFS_IOC_FSGEOMETRY_V1_32: | 392 | case XFS_IOC_FSGEOMETRY_V1_32: |
369 | return xfs_compat_ioc_fsgeometry_v1(mp, arg); | 393 | return xfs_compat_ioc_fsgeometry_v1(mp, arg); |
394 | case XFS_IOC_FSGROWFSDATA_32: { | ||
395 | struct xfs_growfs_data in; | ||
396 | |||
397 | if (xfs_compat_growfs_data_copyin(&in, arg)) | ||
398 | return -XFS_ERROR(EFAULT); | ||
399 | error = xfs_growfs_data(mp, &in); | ||
400 | return -error; | ||
401 | } | ||
402 | case XFS_IOC_FSGROWFSRT_32: { | ||
403 | struct xfs_growfs_rt in; | ||
404 | |||
405 | if (xfs_compat_growfs_rt_copyin(&in, arg)) | ||
406 | return -XFS_ERROR(EFAULT); | ||
407 | error = xfs_growfs_rt(mp, &in); | ||
408 | return -error; | ||
409 | } | ||
370 | #else /* These are handled fine if no alignment issues */ | 410 | #else /* These are handled fine if no alignment issues */ |
371 | case XFS_IOC_ALLOCSP: | 411 | case XFS_IOC_ALLOCSP: |
372 | case XFS_IOC_FREESP: | 412 | case XFS_IOC_FREESP: |