Commit e5bfd05f authored by Nathan Scott's avatar Nathan Scott Committed by Nathan Scott

[XFS] Use sparse whitespace approach that Al took to be more consistent. Couple more sparse fixes.

SGI Modid: xfs-linux:xfs-kern:177030a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 6090afc2
...@@ -61,7 +61,7 @@ static struct vm_operations_struct linvfs_file_vm_ops; ...@@ -61,7 +61,7 @@ static struct vm_operations_struct linvfs_file_vm_ops;
STATIC inline ssize_t STATIC inline ssize_t
__linvfs_read( __linvfs_read(
struct kiocb *iocb, struct kiocb *iocb,
char __user *buf, char __user *buf,
int ioflags, int ioflags,
size_t count, size_t count,
loff_t pos) loff_t pos)
...@@ -83,7 +83,7 @@ __linvfs_read( ...@@ -83,7 +83,7 @@ __linvfs_read(
STATIC ssize_t STATIC ssize_t
linvfs_read( linvfs_read(
struct kiocb *iocb, struct kiocb *iocb,
char __user *buf, char __user *buf,
size_t count, size_t count,
loff_t pos) loff_t pos)
{ {
...@@ -93,7 +93,7 @@ linvfs_read( ...@@ -93,7 +93,7 @@ linvfs_read(
STATIC ssize_t STATIC ssize_t
linvfs_read_invis( linvfs_read_invis(
struct kiocb *iocb, struct kiocb *iocb,
char __user *buf, char __user *buf,
size_t count, size_t count,
loff_t pos) loff_t pos)
{ {
...@@ -104,12 +104,12 @@ linvfs_read_invis( ...@@ -104,12 +104,12 @@ linvfs_read_invis(
STATIC inline ssize_t STATIC inline ssize_t
__linvfs_write( __linvfs_write(
struct kiocb *iocb, struct kiocb *iocb,
const char __user *buf, const char __user *buf,
int ioflags, int ioflags,
size_t count, size_t count,
loff_t pos) loff_t pos)
{ {
struct iovec iov = { (void __user *)buf, count}; struct iovec iov = {(void __user *)buf, count};
struct file *file = iocb->ki_filp; struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host; struct inode *inode = file->f_mapping->host;
vnode_t *vp = LINVFS_GET_VP(inode); vnode_t *vp = LINVFS_GET_VP(inode);
...@@ -134,7 +134,7 @@ __linvfs_write( ...@@ -134,7 +134,7 @@ __linvfs_write(
STATIC ssize_t STATIC ssize_t
linvfs_write( linvfs_write(
struct kiocb *iocb, struct kiocb *iocb,
const char __user *buf, const char __user *buf,
size_t count, size_t count,
loff_t pos) loff_t pos)
{ {
...@@ -144,7 +144,7 @@ linvfs_write( ...@@ -144,7 +144,7 @@ linvfs_write(
STATIC ssize_t STATIC ssize_t
linvfs_write_invis( linvfs_write_invis(
struct kiocb *iocb, struct kiocb *iocb,
const char __user *buf, const char __user *buf,
size_t count, size_t count,
loff_t pos) loff_t pos)
{ {
...@@ -259,7 +259,7 @@ linvfs_sendfile( ...@@ -259,7 +259,7 @@ linvfs_sendfile(
loff_t *ppos, loff_t *ppos,
size_t count, size_t count,
read_actor_t actor, read_actor_t actor,
void __user *target) void __user *target)
{ {
vnode_t *vp = LINVFS_GET_VP(filp->f_dentry->d_inode); vnode_t *vp = LINVFS_GET_VP(filp->f_dentry->d_inode);
ssize_t rval; ssize_t rval;
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
STATIC int STATIC int
xfs_find_handle( xfs_find_handle(
unsigned int cmd, unsigned int cmd,
void __user *arg) void __user *arg)
{ {
int hsize; int hsize;
xfs_handle_t handle; xfs_handle_t handle;
...@@ -211,14 +211,14 @@ xfs_vget_fsop_handlereq( ...@@ -211,14 +211,14 @@ xfs_vget_fsop_handlereq(
xfs_mount_t *mp, xfs_mount_t *mp,
struct inode *parinode, /* parent inode pointer */ struct inode *parinode, /* parent inode pointer */
int cap, /* capability level for op */ int cap, /* capability level for op */
void __user *arg, /* userspace data pointer */ void __user *arg, /* userspace data pointer */
unsigned long size, /* size of expected struct */ unsigned long size, /* size of expected struct */
/* output arguments */ /* output arguments */
xfs_fsop_handlereq_t *hreq, xfs_fsop_handlereq_t *hreq,
vnode_t **vp, vnode_t **vp,
struct inode **inode) struct inode **inode)
{ {
void __user *hanp; void __user *hanp;
size_t hlen; size_t hlen;
xfs_fid_t *xfid; xfs_fid_t *xfid;
xfs_handle_t *handlep; xfs_handle_t *handlep;
...@@ -300,7 +300,7 @@ xfs_vget_fsop_handlereq( ...@@ -300,7 +300,7 @@ xfs_vget_fsop_handlereq(
STATIC int STATIC int
xfs_open_by_handle( xfs_open_by_handle(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg, void __user *arg,
struct file *parfilp, struct file *parfilp,
struct inode *parinode) struct inode *parinode)
{ {
...@@ -383,7 +383,7 @@ xfs_open_by_handle( ...@@ -383,7 +383,7 @@ xfs_open_by_handle(
STATIC int STATIC int
xfs_readlink_by_handle( xfs_readlink_by_handle(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg, void __user *arg,
struct file *parfilp, struct file *parfilp,
struct inode *parinode) struct inode *parinode)
{ {
...@@ -429,7 +429,7 @@ xfs_readlink_by_handle( ...@@ -429,7 +429,7 @@ xfs_readlink_by_handle(
STATIC int STATIC int
xfs_fssetdm_by_handle( xfs_fssetdm_by_handle(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg, void __user *arg,
struct file *parfilp, struct file *parfilp,
struct inode *parinode) struct inode *parinode)
{ {
...@@ -469,7 +469,7 @@ xfs_fssetdm_by_handle( ...@@ -469,7 +469,7 @@ xfs_fssetdm_by_handle(
STATIC int STATIC int
xfs_attrlist_by_handle( xfs_attrlist_by_handle(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg, void __user *arg,
struct file *parfilp, struct file *parfilp,
struct inode *parinode) struct inode *parinode)
{ {
...@@ -498,7 +498,7 @@ xfs_attrlist_by_handle( ...@@ -498,7 +498,7 @@ xfs_attrlist_by_handle(
STATIC int STATIC int
xfs_attrmulti_by_handle( xfs_attrmulti_by_handle(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg, void __user *arg,
struct file *parfilp, struct file *parfilp,
struct inode *parinode) struct inode *parinode)
{ {
...@@ -577,23 +577,23 @@ xfs_ioc_space( ...@@ -577,23 +577,23 @@ xfs_ioc_space(
struct file *filp, struct file *filp,
int flags, int flags,
unsigned int cmd, unsigned int cmd,
void __user *arg); void __user *arg);
STATIC int STATIC int
xfs_ioc_bulkstat( xfs_ioc_bulkstat(
xfs_mount_t *mp, xfs_mount_t *mp,
unsigned int cmd, unsigned int cmd,
void __user *arg); void __user *arg);
STATIC int STATIC int
xfs_ioc_fsgeometry_v1( xfs_ioc_fsgeometry_v1(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg); void __user *arg);
STATIC int STATIC int
xfs_ioc_fsgeometry( xfs_ioc_fsgeometry(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg); void __user *arg);
STATIC int STATIC int
xfs_ioc_xattr( xfs_ioc_xattr(
...@@ -601,7 +601,7 @@ xfs_ioc_xattr( ...@@ -601,7 +601,7 @@ xfs_ioc_xattr(
xfs_inode_t *ip, xfs_inode_t *ip,
struct file *filp, struct file *filp,
unsigned int cmd, unsigned int cmd,
void __user *arg); void __user *arg);
STATIC int STATIC int
xfs_ioc_getbmap( xfs_ioc_getbmap(
...@@ -609,12 +609,12 @@ xfs_ioc_getbmap( ...@@ -609,12 +609,12 @@ xfs_ioc_getbmap(
struct file *filp, struct file *filp,
int flags, int flags,
unsigned int cmd, unsigned int cmd,
void __user *arg); void __user *arg);
STATIC int STATIC int
xfs_ioc_getbmapx( xfs_ioc_getbmapx(
bhv_desc_t *bdp, bhv_desc_t *bdp,
void __user *arg); void __user *arg);
int int
xfs_ioctl( xfs_ioctl(
...@@ -623,7 +623,7 @@ xfs_ioctl( ...@@ -623,7 +623,7 @@ xfs_ioctl(
struct file *filp, struct file *filp,
int ioflags, int ioflags,
unsigned int cmd, unsigned int cmd,
void __user *arg) void __user *arg)
{ {
int error; int error;
vnode_t *vp; vnode_t *vp;
...@@ -880,7 +880,7 @@ xfs_ioc_space( ...@@ -880,7 +880,7 @@ xfs_ioc_space(
struct file *filp, struct file *filp,
int ioflags, int ioflags,
unsigned int cmd, unsigned int cmd,
void __user *arg) void __user *arg)
{ {
xfs_flock64_t bf; xfs_flock64_t bf;
int attr_flags = 0; int attr_flags = 0;
...@@ -912,7 +912,7 @@ STATIC int ...@@ -912,7 +912,7 @@ STATIC int
xfs_ioc_bulkstat( xfs_ioc_bulkstat(
xfs_mount_t *mp, xfs_mount_t *mp,
unsigned int cmd, unsigned int cmd,
void __user *arg) void __user *arg)
{ {
xfs_fsop_bulkreq_t bulkreq; xfs_fsop_bulkreq_t bulkreq;
int count; /* # of records returned */ int count; /* # of records returned */
...@@ -975,7 +975,7 @@ xfs_ioc_bulkstat( ...@@ -975,7 +975,7 @@ xfs_ioc_bulkstat(
STATIC int STATIC int
xfs_ioc_fsgeometry_v1( xfs_ioc_fsgeometry_v1(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg) void __user *arg)
{ {
xfs_fsop_geom_v1_t fsgeo; xfs_fsop_geom_v1_t fsgeo;
int error; int error;
...@@ -992,7 +992,7 @@ xfs_ioc_fsgeometry_v1( ...@@ -992,7 +992,7 @@ xfs_ioc_fsgeometry_v1(
STATIC int STATIC int
xfs_ioc_fsgeometry( xfs_ioc_fsgeometry(
xfs_mount_t *mp, xfs_mount_t *mp,
void __user *arg) void __user *arg)
{ {
xfs_fsop_geom_t fsgeo; xfs_fsop_geom_t fsgeo;
int error; int error;
...@@ -1071,7 +1071,7 @@ xfs_ioc_xattr( ...@@ -1071,7 +1071,7 @@ xfs_ioc_xattr(
xfs_inode_t *ip, xfs_inode_t *ip,
struct file *filp, struct file *filp,
unsigned int cmd, unsigned int cmd,
void __user *arg) void __user *arg)
{ {
struct fsxattr fa; struct fsxattr fa;
vattr_t va; vattr_t va;
...@@ -1176,7 +1176,7 @@ xfs_ioc_getbmap( ...@@ -1176,7 +1176,7 @@ xfs_ioc_getbmap(
struct file *filp, struct file *filp,
int ioflags, int ioflags,
unsigned int cmd, unsigned int cmd,
void __user *arg) void __user *arg)
{ {
struct getbmap bm; struct getbmap bm;
int iflags; int iflags;
...@@ -1204,7 +1204,7 @@ xfs_ioc_getbmap( ...@@ -1204,7 +1204,7 @@ xfs_ioc_getbmap(
STATIC int STATIC int
xfs_ioc_getbmapx( xfs_ioc_getbmapx(
bhv_desc_t *bdp, bhv_desc_t *bdp,
void __user *arg) void __user *arg)
{ {
struct getbmapx bmx; struct getbmapx bmx;
struct getbmap bm; struct getbmap bm;
......
...@@ -376,7 +376,7 @@ linvfs_rename( ...@@ -376,7 +376,7 @@ linvfs_rename(
STATIC int STATIC int
linvfs_readlink( linvfs_readlink(
struct dentry *dentry, struct dentry *dentry,
char __user *buf, char __user *buf,
int size) int size)
{ {
vnode_t *vp = LINVFS_GET_VP(dentry->d_inode); vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
......
...@@ -366,7 +366,7 @@ xfs_sendfile( ...@@ -366,7 +366,7 @@ xfs_sendfile(
int ioflags, int ioflags,
size_t count, size_t count,
read_actor_t actor, read_actor_t actor,
void __user *target, void __user *target,
cred_t *credp) cred_t *credp)
{ {
ssize_t ret; ssize_t ret;
......
...@@ -1732,7 +1732,7 @@ STATIC int ...@@ -1732,7 +1732,7 @@ STATIC int
xfs_qm_dqusage_adjust( xfs_qm_dqusage_adjust(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t ino, /* inode number to get data for */ xfs_ino_t ino, /* inode number to get data for */
void __user *buffer, /* not used */ void __user *buffer, /* not used */
int ubsize, /* not used */ int ubsize, /* not used */
void *private_data, /* not used */ void *private_data, /* not used */
xfs_daddr_t bno, /* starting block of inode cluster */ xfs_daddr_t bno, /* starting block of inode cluster */
......
...@@ -1299,7 +1299,7 @@ STATIC int ...@@ -1299,7 +1299,7 @@ STATIC int
xfs_qm_internalqcheck_adjust( xfs_qm_internalqcheck_adjust(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t ino, /* inode number to get data for */ xfs_ino_t ino, /* inode number to get data for */
void __user *buffer, /* not used */ void __user *buffer, /* not used */
int ubsize, /* not used */ int ubsize, /* not used */
void *private_data, /* not used */ void *private_data, /* not used */
xfs_daddr_t bno, /* starting block of inode cluster */ xfs_daddr_t bno, /* starting block of inode cluster */
......
...@@ -203,8 +203,6 @@ STATIC void ...@@ -203,8 +203,6 @@ STATIC void
xfs_bmap_check_extents( xfs_bmap_check_extents(
xfs_inode_t *ip, /* incore inode pointer */ xfs_inode_t *ip, /* incore inode pointer */
int whichfork); /* data or attr fork */ int whichfork); /* data or attr fork */
#else
#define xfs_bmap_check_extents(ip,w)
#endif #endif
/* /*
...@@ -5503,7 +5501,7 @@ int /* error code */ ...@@ -5503,7 +5501,7 @@ int /* error code */
xfs_getbmap( xfs_getbmap(
bhv_desc_t *bdp, /* XFS behavior descriptor*/ bhv_desc_t *bdp, /* XFS behavior descriptor*/
struct getbmap *bmv, /* user bmap structure */ struct getbmap *bmv, /* user bmap structure */
void __user *ap, /* pointer to user's array */ void __user *ap, /* pointer to user's array */
int interface) /* interface flags */ int interface) /* interface flags */
{ {
__int64_t bmvend; /* last block requested */ __int64_t bmvend; /* last block requested */
...@@ -5692,8 +5690,10 @@ xfs_getbmap( ...@@ -5692,8 +5690,10 @@ xfs_getbmap(
(__int64_t)(bmvend - bmv->bmv_offset)); (__int64_t)(bmvend - bmv->bmv_offset));
bmv->bmv_entries++; bmv->bmv_entries++;
ap = (interface & BMV_IF_EXTENDED) ? ap = (interface & BMV_IF_EXTENDED) ?
(void __user *)((struct getbmapx __user *)ap + 1) : (void __user *)
(void __user *)((struct getbmap __user *)ap + 1); ((struct getbmapx __user *)ap + 1) :
(void __user *)
((struct getbmap __user *)ap + 1);
} }
} }
} while (nmap && nexleft && bmv->bmv_length); } while (nmap && nexleft && bmv->bmv_length);
......
...@@ -328,7 +328,7 @@ int /* error code */ ...@@ -328,7 +328,7 @@ int /* error code */
xfs_getbmap( xfs_getbmap(
bhv_desc_t *bdp, /* XFS behavior descriptor*/ bhv_desc_t *bdp, /* XFS behavior descriptor*/
struct getbmap *bmv, /* user bmap structure */ struct getbmap *bmv, /* user bmap structure */
void __user *ap, /* pointer to user's array */ void __user *ap, /* pointer to user's array */
int iflags); /* interface flags */ int iflags); /* interface flags */
/* /*
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
*/ */
int int
xfs_swapext( xfs_swapext(
xfs_swapext_t __user *sxp) xfs_swapext_t __user *sxp)
{ {
xfs_swapext_t sx; xfs_swapext_t sx;
xfs_inode_t *ip=NULL, *tip=NULL, *ips[2]; xfs_inode_t *ip=NULL, *tip=NULL, *ips[2];
......
...@@ -313,10 +313,10 @@ typedef struct xfs_bstat { ...@@ -313,10 +313,10 @@ typedef struct xfs_bstat {
* The user-level BulkStat Request interface structure. * The user-level BulkStat Request interface structure.
*/ */
typedef struct xfs_fsop_bulkreq { typedef struct xfs_fsop_bulkreq {
__u64 __user *lastip; /* last inode # pointer */ __u64 __user *lastip; /* last inode # pointer */
__s32 icount; /* count of entries in buffer */ __s32 icount; /* count of entries in buffer */
void __user *ubuffer; /* user buffer for inode desc. */ void __user *ubuffer;/* user buffer for inode desc. */
__s32 __user *ocount; /* output count pointer */ __s32 __user *ocount; /* output count pointer */
} xfs_fsop_bulkreq_t; } xfs_fsop_bulkreq_t;
...@@ -344,12 +344,12 @@ typedef struct xfs_error_injection { ...@@ -344,12 +344,12 @@ typedef struct xfs_error_injection {
*/ */
typedef struct xfs_fsop_handlereq { typedef struct xfs_fsop_handlereq {
__u32 fd; /* fd for FD_TO_HANDLE */ __u32 fd; /* fd for FD_TO_HANDLE */
void __user *path; /* user pathname */ void __user *path; /* user pathname */
__u32 oflags; /* open flags */ __u32 oflags; /* open flags */
void __user *ihandle; /* user supplied handle */ void __user *ihandle;/* user supplied handle */
__u32 ihandlen; /* user supplied length */ __u32 ihandlen; /* user supplied length */
void __user *ohandle; /* user buffer for handle */ void __user *ohandle;/* user buffer for handle */
__u32 __user *ohandlen; /* user buffer length */ __u32 __user *ohandlen;/* user buffer length */
} xfs_fsop_handlereq_t; } xfs_fsop_handlereq_t;
/* /*
...@@ -360,35 +360,35 @@ typedef struct xfs_fsop_handlereq { ...@@ -360,35 +360,35 @@ typedef struct xfs_fsop_handlereq {
*/ */
typedef struct xfs_fsop_setdm_handlereq { typedef struct xfs_fsop_setdm_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */ struct xfs_fsop_handlereq hreq; /* handle information */
struct fsdmidata __user *data; /* DMAPI data to set */ struct fsdmidata __user *data; /* DMAPI data */
} xfs_fsop_setdm_handlereq_t; } xfs_fsop_setdm_handlereq_t;
typedef struct xfs_attrlist_cursor { typedef struct xfs_attrlist_cursor {
__u32 opaque[4]; __u32 opaque[4];
} xfs_attrlist_cursor_t; } xfs_attrlist_cursor_t;
typedef struct xfs_fsop_attrlist_handlereq { typedef struct xfs_fsop_attrlist_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */ struct xfs_fsop_handlereq hreq; /* handle interface structure */
struct xfs_attrlist_cursor pos; /* opaque cookie, list offset */ struct xfs_attrlist_cursor pos; /* opaque cookie, list offset */
__u32 flags; /* flags, use ROOT/USER names */ __u32 flags; /* which namespace to use */
__u32 buflen; /* length of buffer supplied */ __u32 buflen; /* length of buffer supplied */
void *buffer; /* attrlist data to return */ void __user *buffer; /* returned names */
} xfs_fsop_attrlist_handlereq_t; } xfs_fsop_attrlist_handlereq_t;
typedef struct xfs_attr_multiop { typedef struct xfs_attr_multiop {
__u32 am_opcode; __u32 am_opcode;
__s32 am_error; __s32 am_error;
void *am_attrname; void __user *am_attrname;
void *am_attrvalue; void __user *am_attrvalue;
__u32 am_length; __u32 am_length;
__u32 am_flags; __u32 am_flags;
} xfs_attr_multiop_t; } xfs_attr_multiop_t;
typedef struct xfs_fsop_attrmulti_handlereq { typedef struct xfs_fsop_attrmulti_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */ struct xfs_fsop_handlereq hreq; /* handle interface structure */
__u32 opcount; /* count of following multiop */ __u32 opcount;/* count of following multiop */
struct xfs_attr_multiop __user *ops; /* attr_multi data to get/set */ struct xfs_attr_multiop __user *ops; /* attr_multi data */
} xfs_fsop_attrmulti_handlereq_t; } xfs_fsop_attrmulti_handlereq_t;
/* /*
......
...@@ -68,7 +68,7 @@ int /* error status */ ...@@ -68,7 +68,7 @@ int /* error status */
xfs_bulkstat_one( xfs_bulkstat_one(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t ino, /* inode number to get data for */ xfs_ino_t ino, /* inode number to get data for */
void __user *buffer, /* buffer to place output in */ void __user *buffer, /* buffer to place output in */
int ubsize, /* size of buffer */ int ubsize, /* size of buffer */
void *private_data, /* my private data */ void *private_data, /* my private data */
xfs_daddr_t bno, /* starting bno of inode cluster */ xfs_daddr_t bno, /* starting bno of inode cluster */
...@@ -231,7 +231,7 @@ xfs_bulkstat( ...@@ -231,7 +231,7 @@ xfs_bulkstat(
bulkstat_one_pf formatter, /* func that'd fill a single buf */ bulkstat_one_pf formatter, /* func that'd fill a single buf */
void *private_data,/* private data for formatter */ void *private_data,/* private data for formatter */
size_t statstruct_size, /* sizeof struct filling */ size_t statstruct_size, /* sizeof struct filling */
char __user *ubuffer, /* buffer with inode stats */ char __user *ubuffer, /* buffer with inode stats */
int flags, /* defined in xfs_itable.h */ int flags, /* defined in xfs_itable.h */
int *done) /* 1 if there're more stats to get */ int *done) /* 1 if there're more stats to get */
{ {
...@@ -265,7 +265,7 @@ xfs_bulkstat( ...@@ -265,7 +265,7 @@ xfs_bulkstat(
int tmp; /* result value from btree calls */ int tmp; /* result value from btree calls */
int ubcount; /* size of user's buffer */ int ubcount; /* size of user's buffer */
int ubleft; /* bytes left in user's buffer */ int ubleft; /* bytes left in user's buffer */
char __user *ubufp; /* current pointer into user's buffer */ char __user *ubufp; /* pointer into user's buffer */
int ubelem; /* spaces used in user's buffer */ int ubelem; /* spaces used in user's buffer */
int ubused; /* bytes used by formatter */ int ubused; /* bytes used by formatter */
xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */ xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */
...@@ -633,7 +633,7 @@ int /* error status */ ...@@ -633,7 +633,7 @@ int /* error status */
xfs_bulkstat_single( xfs_bulkstat_single(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *lastinop, /* inode to return */ xfs_ino_t *lastinop, /* inode to return */
char __user *buffer,/* buffer with inode stats */ char __user *buffer, /* buffer with inode stats */
int *done) /* 1 if there're more stats to get */ int *done) /* 1 if there're more stats to get */
{ {
int count; /* count value for bulkstat call */ int count; /* count value for bulkstat call */
...@@ -682,7 +682,7 @@ xfs_inumbers( ...@@ -682,7 +682,7 @@ xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *lastino, /* last inode returned */ xfs_ino_t *lastino, /* last inode returned */
int *count, /* size of buffer/count returned */ int *count, /* size of buffer/count returned */
xfs_inogrp_t __user *ubuffer) /* buffer with inode descriptions */ xfs_inogrp_t __user *ubuffer)/* buffer with inode descriptions */
{ {
xfs_buf_t *agbp; xfs_buf_t *agbp;
xfs_agino_t agino; xfs_agino_t agino;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
*/ */
typedef int (*bulkstat_one_pf)(struct xfs_mount *mp, typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
xfs_ino_t ino, xfs_ino_t ino,
void __user *buffer, void __user *buffer,
int ubsize, int ubsize,
void *private_data, void *private_data,
xfs_daddr_t bno, xfs_daddr_t bno,
...@@ -73,7 +73,7 @@ xfs_bulkstat( ...@@ -73,7 +73,7 @@ xfs_bulkstat(
bulkstat_one_pf formatter, /* func that'd fill a single buf */ bulkstat_one_pf formatter, /* func that'd fill a single buf */
void *private_data, /* private data for formatter */ void *private_data, /* private data for formatter */
size_t statstruct_size,/* sizeof struct that we're filling */ size_t statstruct_size,/* sizeof struct that we're filling */
char __user *ubuffer, /* buffer with inode stats */ char __user *ubuffer,/* buffer with inode stats */
int flags, /* flag to control access method */ int flags, /* flag to control access method */
int *done); /* 1 if there're more stats to get */ int *done); /* 1 if there're more stats to get */
...@@ -81,14 +81,14 @@ int ...@@ -81,14 +81,14 @@ int
xfs_bulkstat_single( xfs_bulkstat_single(
xfs_mount_t *mp, xfs_mount_t *mp,
xfs_ino_t *lastinop, xfs_ino_t *lastinop,
char __user *buffer, char __user *buffer,
int *done); int *done);
int int
xfs_bulkstat_one( xfs_bulkstat_one(
xfs_mount_t *mp, xfs_mount_t *mp,
xfs_ino_t ino, xfs_ino_t ino,
void __user *buffer, void __user *buffer,
int ubsize, int ubsize,
void *private_data, void *private_data,
xfs_daddr_t bno, xfs_daddr_t bno,
...@@ -101,6 +101,6 @@ xfs_inumbers( ...@@ -101,6 +101,6 @@ xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *last, /* last inode returned */ xfs_ino_t *last, /* last inode returned */
int *count, /* size of buffer/count returned */ int *count, /* size of buffer/count returned */
xfs_inogrp_t __user *buffer);/* buffer with inode descriptions */ xfs_inogrp_t __user *buffer);/* buffer with inode info */
#endif /* __XFS_ITABLE_H__ */ #endif /* __XFS_ITABLE_H__ */
...@@ -309,23 +309,27 @@ typedef struct xfs_dqtrxops { ...@@ -309,23 +309,27 @@ typedef struct xfs_dqtrxops {
} xfs_dqtrxops_t; } xfs_dqtrxops_t;
#define XFS_DQTRXOP(mp, tp, op, args...) \ #define XFS_DQTRXOP(mp, tp, op, args...) \
((mp)->m_qm_ops.xfs_dqtrxops ? \ ((mp)->m_qm_ops.xfs_dqtrxops ? \
((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : 0) ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : 0)
#define XFS_DQTRXOP_VOID(mp, tp, op, args...) \
((mp)->m_qm_ops.xfs_dqtrxops ? \
((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : (void)0)
#define XFS_TRANS_DUP_DQINFO(mp, otp, ntp) \ #define XFS_TRANS_DUP_DQINFO(mp, otp, ntp) \
XFS_DQTRXOP(mp, otp, qo_dup_dqinfo, ntp) XFS_DQTRXOP_VOID(mp, otp, qo_dup_dqinfo, ntp)
#define XFS_TRANS_FREE_DQINFO(mp, tp) \ #define XFS_TRANS_FREE_DQINFO(mp, tp) \
XFS_DQTRXOP(mp, tp, qo_free_dqinfo) XFS_DQTRXOP_VOID(mp, tp, qo_free_dqinfo)
#define XFS_TRANS_MOD_DQUOT_BYINO(mp, tp, ip, field, delta) \ #define XFS_TRANS_MOD_DQUOT_BYINO(mp, tp, ip, field, delta) \
XFS_DQTRXOP(mp, tp, qo_mod_dquot_byino, ip, field, delta) XFS_DQTRXOP_VOID(mp, tp, qo_mod_dquot_byino, ip, field, delta)
#define XFS_TRANS_APPLY_DQUOT_DELTAS(mp, tp) \ #define XFS_TRANS_APPLY_DQUOT_DELTAS(mp, tp) \
XFS_DQTRXOP(mp, tp, qo_apply_dquot_deltas) XFS_DQTRXOP_VOID(mp, tp, qo_apply_dquot_deltas)
#define XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, ninos, fl) \ #define XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, ninos, fl) \
XFS_DQTRXOP(mp, tp, qo_reserve_quota_nblks, mp, ip, nblks, ninos, fl) XFS_DQTRXOP(mp, tp, qo_reserve_quota_nblks, mp, ip, nblks, ninos, fl)
#define XFS_TRANS_RESERVE_QUOTA_BYDQUOTS(mp, tp, ud, gd, nb, ni, fl) \ #define XFS_TRANS_RESERVE_QUOTA_BYDQUOTS(mp, tp, ud, gd, nb, ni, fl) \
XFS_DQTRXOP(mp, tp, qo_reserve_quota_bydquots, mp, ud, gd, nb, ni, fl) XFS_DQTRXOP(mp, tp, qo_reserve_quota_bydquots, mp, ud, gd, nb, ni, fl)
#define XFS_TRANS_UNRESERVE_AND_MOD_DQUOTS(mp, tp) \ #define XFS_TRANS_UNRESERVE_AND_MOD_DQUOTS(mp, tp) \
XFS_DQTRXOP(mp, tp, qo_unreserve_and_mod_dquots) XFS_DQTRXOP_VOID(mp, tp, qo_unreserve_and_mod_dquots)
#define XFS_TRANS_RESERVE_BLKQUOTA(mp, tp, ip, nblks) \ #define XFS_TRANS_RESERVE_BLKQUOTA(mp, tp, ip, nblks) \
XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, 0, \ XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, tp, ip, nblks, 0, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment