aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2004-08-20 05:56:34 +1000
committerNathan Scott <nathans@lips.borg.umn.edu>2004-08-20 05:56:34 +1000
commitdcf9867e68b8234750f54b151e14ce10befc4934 (patch)
tree663fd72d83463510d18fc6985fc10fb422fe844c /fs
parent6a3eaa1e3a2f9b815e4c920557a4a1ffc91c3e70 (diff)
downloadhistory-dcf9867e68b8234750f54b151e14ce10befc4934.tar.gz
[XFS] sparse: annotate source for user pointers. From Chris Wedgwood.
SGI Modid: xfs-linux:xfs-kern:174337a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_acl.h2
-rw-r--r--fs/xfs/xfs_bmap.c6
-rw-r--r--fs/xfs/xfs_bmap.h2
-rw-r--r--fs/xfs/xfs_dfrag.c2
-rw-r--r--fs/xfs/xfs_dfrag.h2
-rw-r--r--fs/xfs/xfs_fs.h18
-rw-r--r--fs/xfs/xfs_itable.c12
-rw-r--r--fs/xfs/xfs_itable.h10
8 files changed, 27 insertions, 27 deletions
diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h
index 35e56b7f00abb7..90a8a5e196ca9c 100644
--- a/fs/xfs/xfs_acl.h
+++ b/fs/xfs/xfs_acl.h
@@ -95,7 +95,7 @@ extern int xfs_acl_vremove(struct vnode *vp, int);
#define _ACL_XFS_IACCESS(i,m,c) (XFS_IFORK_Q(i) ? xfs_acl_iaccess(i,m,c) : -1)
#define _ACL_ALLOC(a) ((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
-#define _ACL_FREE(a) ((a)? kmem_zone_free(xfs_acl_zone, (a)) : 0)
+#define _ACL_FREE(a) ((a)? kmem_zone_free(xfs_acl_zone, (a)):(void)0)
#else
#define xfs_acl_zone_init(zone,name)
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 70b7a0265d9398..83cd4e4667af3c 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -5478,7 +5478,7 @@ int /* error code */
xfs_getbmap(
bhv_desc_t *bdp, /* XFS behavior descriptor*/
struct getbmap *bmv, /* user bmap structure */
- void *ap, /* pointer to user's array */
+ void __user *ap, /* pointer to user's array */
int interface) /* interface flags */
{
__int64_t bmvend; /* last block requested */
@@ -5667,8 +5667,8 @@ xfs_getbmap(
(__int64_t)(bmvend - bmv->bmv_offset));
bmv->bmv_entries++;
ap = (interface & BMV_IF_EXTENDED) ?
- (void *)((struct getbmapx *)ap + 1) :
- (void *)((struct getbmap *)ap + 1);
+ (void __user *)((struct getbmapx __user *)ap + 1) :
+ (void __user *)((struct getbmap __user *)ap + 1);
}
}
} while (nmap && nexleft && bmv->bmv_length);
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 479e0d5598b4f1..096840449c588b 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -328,7 +328,7 @@ int /* error code */
xfs_getbmap(
bhv_desc_t *bdp, /* XFS behavior descriptor*/
struct getbmap *bmv, /* user bmap structure */
- void *ap, /* pointer to user's array */
+ void __user *ap, /* pointer to user's array */
int iflags); /* interface flags */
/*
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index f3bc48fe0c5ee6..b38dbb3433ddf0 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -65,7 +65,7 @@
*/
int
xfs_swapext(
- xfs_swapext_t *sxp)
+ xfs_swapext_t __user *sxp)
{
xfs_swapext_t sx;
xfs_inode_t *ip=NULL, *tip=NULL, *ips[2];
diff --git a/fs/xfs/xfs_dfrag.h b/fs/xfs/xfs_dfrag.h
index 0e1c26fba89354..904860594b8f1f 100644
--- a/fs/xfs/xfs_dfrag.h
+++ b/fs/xfs/xfs_dfrag.h
@@ -60,7 +60,7 @@ typedef struct xfs_swapext
/*
* Syscall interface for xfs_swapext
*/
-int xfs_swapext(struct xfs_swapext *sx);
+int xfs_swapext(struct xfs_swapext __user *sx);
#endif /* __KERNEL__ */
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index 1ed650e902d258..8ec90f0f45a834 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -313,10 +313,10 @@ typedef struct xfs_bstat {
* The user-level BulkStat Request interface structure.
*/
typedef struct xfs_fsop_bulkreq {
- __u64 *lastip; /* last inode # pointer */
+ __u64 __user *lastip; /* last inode # pointer */
__s32 icount; /* count of entries in buffer */
- void *ubuffer; /* user buffer for inode desc. */
- __s32 *ocount; /* output count pointer */
+ void __user *ubuffer; /* user buffer for inode desc. */
+ __s32 __user *ocount; /* output count pointer */
} xfs_fsop_bulkreq_t;
@@ -344,12 +344,12 @@ typedef struct xfs_error_injection {
*/
typedef struct xfs_fsop_handlereq {
__u32 fd; /* fd for FD_TO_HANDLE */
- void *path; /* user pathname */
+ void __user *path; /* user pathname */
__u32 oflags; /* open flags */
- void *ihandle; /* user supplied handle */
+ void __user *ihandle; /* user supplied handle */
__u32 ihandlen; /* user supplied length */
- void *ohandle; /* user buffer for handle */
- __u32 *ohandlen; /* user buffer length */
+ void __user *ohandle; /* user buffer for handle */
+ __u32 __user *ohandlen; /* user buffer length */
} xfs_fsop_handlereq_t;
/*
@@ -361,7 +361,7 @@ typedef struct xfs_fsop_handlereq {
typedef struct xfs_fsop_setdm_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */
- struct fsdmidata *data; /* DMAPI data to set */
+ struct fsdmidata __user *data; /* DMAPI data to set */
} xfs_fsop_setdm_handlereq_t;
typedef struct xfs_attrlist_cursor {
@@ -388,7 +388,7 @@ typedef struct xfs_attr_multiop {
typedef struct xfs_fsop_attrmulti_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */
__u32 opcount; /* count of following multiop */
- struct xfs_attr_multiop *ops; /* attr_multi data to get/set */
+ struct xfs_attr_multiop __user *ops; /* attr_multi data to get/set */
} xfs_fsop_attrmulti_handlereq_t;
/*
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index 01fae1abb2ea24..35c004bb1be61a 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -68,7 +68,7 @@ int /* error status */
xfs_bulkstat_one(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t ino, /* inode number to get data for */
- void *buffer, /* buffer to place output in */
+ char __user *buffer, /* buffer to place output in */
int ubsize, /* size of buffer */
void *private_data, /* my private data */
xfs_daddr_t bno, /* starting bno of inode cluster */
@@ -231,7 +231,7 @@ xfs_bulkstat(
bulkstat_one_pf formatter, /* func that'd fill a single buf */
void *private_data,/* private data for formatter */
size_t statstruct_size, /* sizeof struct filling */
- xfs_caddr_t ubuffer, /* buffer with inode stats */
+ char __user *ubuffer, /* buffer with inode stats */
int flags, /* defined in xfs_itable.h */
int *done) /* 1 if there're more stats to get */
{
@@ -265,7 +265,7 @@ xfs_bulkstat(
int tmp; /* result value from btree calls */
int ubcount; /* size of user's buffer */
int ubleft; /* bytes left in user's buffer */
- xfs_caddr_t ubufp; /* current pointer into user's buffer */
+ char __user *ubufp; /* current pointer into user's buffer */
int ubelem; /* spaces used in user's buffer */
int ubused; /* bytes used by formatter */
xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */
@@ -633,7 +633,7 @@ int /* error status */
xfs_bulkstat_single(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *lastinop, /* inode to return */
- xfs_caddr_t buffer, /* buffer with inode stats */
+ char __user *buffer,/* buffer with inode stats */
int *done) /* 1 if there're more stats to get */
{
int count; /* count value for bulkstat call */
@@ -682,7 +682,7 @@ xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *lastino, /* last inode returned */
int *count, /* size of buffer/count returned */
- xfs_caddr_t ubuffer) /* buffer with inode descriptions */
+ xfs_inogrp_t __user *ubuffer) /* buffer with inode descriptions */
{
xfs_buf_t *agbp;
xfs_agino_t agino;
@@ -766,7 +766,7 @@ xfs_inumbers(
error = XFS_ERROR(EFAULT);
break;
}
- ubuffer += bufidx * sizeof(*buffer);
+ ubuffer += bufidx;
*count += bufidx;
bufidx = 0;
}
diff --git a/fs/xfs/xfs_itable.h b/fs/xfs/xfs_itable.h
index 476e531a9a9ba9..9948eb1712175a 100644
--- a/fs/xfs/xfs_itable.h
+++ b/fs/xfs/xfs_itable.h
@@ -40,7 +40,7 @@
*/
typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
xfs_ino_t ino,
- void *buffer,
+ char __user *buffer,
int ubsize,
void *private_data,
xfs_daddr_t bno,
@@ -73,7 +73,7 @@ xfs_bulkstat(
bulkstat_one_pf formatter, /* func that'd fill a single buf */
void *private_data, /* private data for formatter */
size_t statstruct_size,/* sizeof struct that we're filling */
- xfs_caddr_t ubuffer, /* buffer with inode stats */
+ char __user *ubuffer, /* buffer with inode stats */
int flags, /* flag to control access method */
int *done); /* 1 if there're more stats to get */
@@ -81,14 +81,14 @@ int
xfs_bulkstat_single(
xfs_mount_t *mp,
xfs_ino_t *lastinop,
- xfs_caddr_t buffer,
+ char __user *buffer,
int *done);
int
xfs_bulkstat_one(
xfs_mount_t *mp,
xfs_ino_t ino,
- void *buffer,
+ char __user *buffer,
int ubsize,
void *private_data,
xfs_daddr_t bno,
@@ -101,6 +101,6 @@ xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *last, /* last inode returned */
int *count, /* size of buffer/count returned */
- xfs_caddr_t buffer);/* buffer with inode descriptions */
+ xfs_inogrp_t __user *buffer);/* buffer with inode descriptions */
#endif /* __XFS_ITABLE_H__ */