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
...@@ -109,7 +109,7 @@ __linvfs_write( ...@@ -109,7 +109,7 @@ __linvfs_write(
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);
......
...@@ -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
/* /*
...@@ -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);
......
...@@ -315,7 +315,7 @@ typedef struct xfs_bstat { ...@@ -315,7 +315,7 @@ typedef struct xfs_bstat {
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;
...@@ -346,10 +346,10 @@ typedef struct xfs_fsop_handlereq { ...@@ -346,10 +346,10 @@ 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,8 +360,8 @@ typedef struct xfs_fsop_handlereq { ...@@ -360,8 +360,8 @@ 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 {
...@@ -371,24 +371,24 @@ typedef struct xfs_attrlist_cursor { ...@@ -371,24 +371,24 @@ typedef struct xfs_attrlist_cursor {
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;
/* /*
......
...@@ -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;
......
...@@ -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 */
...@@ -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__ */
...@@ -312,20 +312,24 @@ typedef struct xfs_dqtrxops { ...@@ -312,20 +312,24 @@ typedef struct xfs_dqtrxops {
((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