aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl32.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl32.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index eafcc7c18706..593c05b4df8d 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -18,6 +18,7 @@
18#include <linux/compat.h> 18#include <linux/compat.h>
19#include <linux/ioctl.h> 19#include <linux/ioctl.h>
20#include <linux/mount.h> 20#include <linux/mount.h>
21#include <linux/slab.h>
21#include <asm/uaccess.h> 22#include <asm/uaccess.h>
22#include "xfs.h" 23#include "xfs.h"
23#include "xfs_fs.h" 24#include "xfs_fs.h"
@@ -46,6 +47,7 @@
46#include "xfs_attr.h" 47#include "xfs_attr.h"
47#include "xfs_ioctl.h" 48#include "xfs_ioctl.h"
48#include "xfs_ioctl32.h" 49#include "xfs_ioctl32.h"
50#include "xfs_trace.h"
49 51
50#define _NATIVE_IOC(cmd, type) \ 52#define _NATIVE_IOC(cmd, type) \
51 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) 53 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type))
@@ -410,7 +412,7 @@ xfs_compat_attrmulti_by_handle(
410 compat_xfs_fsop_attrmulti_handlereq_t am_hreq; 412 compat_xfs_fsop_attrmulti_handlereq_t am_hreq;
411 struct dentry *dentry; 413 struct dentry *dentry;
412 unsigned int i, size; 414 unsigned int i, size;
413 char *attr_name; 415 unsigned char *attr_name;
414 416
415 if (!capable(CAP_SYS_ADMIN)) 417 if (!capable(CAP_SYS_ADMIN))
416 return -XFS_ERROR(EPERM); 418 return -XFS_ERROR(EPERM);
@@ -439,7 +441,7 @@ xfs_compat_attrmulti_by_handle(
439 441
440 error = 0; 442 error = 0;
441 for (i = 0; i < am_hreq.opcount; i++) { 443 for (i = 0; i < am_hreq.opcount; i++) {
442 ops[i].am_error = strncpy_from_user(attr_name, 444 ops[i].am_error = strncpy_from_user((char *)attr_name,
443 compat_ptr(ops[i].am_attrname), 445 compat_ptr(ops[i].am_attrname),
444 MAXNAMELEN); 446 MAXNAMELEN);
445 if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN) 447 if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN)