Commit 31b084ae authored by Nathan Scott's avatar Nathan Scott Committed by Christoph Hellwig

[XFS] Fix up uses of nlink_t incorrectly restricting us to 2^16 links for some platforms

SGI Modid: xfs-linux:xfs-kern:22032a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
Signed-off-by: default avatarChristoph Hellwig <hch@sgi.com>
parent de20614b
...@@ -409,7 +409,7 @@ typedef struct vattr { ...@@ -409,7 +409,7 @@ typedef struct vattr {
int va_mask; /* bit-mask of attributes present */ int va_mask; /* bit-mask of attributes present */
enum vtype va_type; /* vnode type (for create) */ enum vtype va_type; /* vnode type (for create) */
mode_t va_mode; /* file access mode and type */ mode_t va_mode; /* file access mode and type */
nlink_t va_nlink; /* number of references to file */ xfs_nlink_t va_nlink; /* number of references to file */
uid_t va_uid; /* owner user id */ uid_t va_uid; /* owner user id */
gid_t va_gid; /* owner group id */ gid_t va_gid; /* owner group id */
xfs_ino_t va_nodeid; /* file id */ xfs_ino_t va_nodeid; /* file id */
......
...@@ -1130,7 +1130,7 @@ xfs_ialloc( ...@@ -1130,7 +1130,7 @@ xfs_ialloc(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_inode_t *pip, xfs_inode_t *pip,
mode_t mode, mode_t mode,
nlink_t nlink, xfs_nlink_t nlink,
xfs_dev_t rdev, xfs_dev_t rdev,
cred_t *cr, cred_t *cr,
xfs_prid_t prid, xfs_prid_t prid,
......
...@@ -495,9 +495,9 @@ int xfs_itobp(struct xfs_mount *, struct xfs_trans *, ...@@ -495,9 +495,9 @@ int xfs_itobp(struct xfs_mount *, struct xfs_trans *,
int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
xfs_inode_t **, xfs_daddr_t); xfs_inode_t **, xfs_daddr_t);
int xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int); int xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int);
int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, nlink_t, int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t,
xfs_dev_t, struct cred *, xfs_prid_t, int, xfs_nlink_t, xfs_dev_t, struct cred *, xfs_prid_t,
struct xfs_buf **, boolean_t *, xfs_inode_t **); int, struct xfs_buf **, boolean_t *, xfs_inode_t **);
void xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *, void xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *,
int); int);
uint xfs_ip2xflags(struct xfs_inode *); uint xfs_ip2xflags(struct xfs_inode *);
......
...@@ -63,6 +63,7 @@ typedef __u64 xfs_ino_t; /* <inode> type */ ...@@ -63,6 +63,7 @@ typedef __u64 xfs_ino_t; /* <inode> type */
typedef __s64 xfs_daddr_t; /* <disk address> type */ typedef __s64 xfs_daddr_t; /* <disk address> type */
typedef char * xfs_caddr_t; /* <core address> type */ typedef char * xfs_caddr_t; /* <core address> type */
typedef __u32 xfs_dev_t; typedef __u32 xfs_dev_t;
typedef __u32 xfs_nlink_t;
/* __psint_t is the same size as a pointer */ /* __psint_t is the same size as a pointer */
#if (BITS_PER_LONG == 32) #if (BITS_PER_LONG == 32)
......
...@@ -147,7 +147,7 @@ xfs_dir_ialloc( ...@@ -147,7 +147,7 @@ xfs_dir_ialloc(
xfs_inode_t *dp, /* directory within whose allocate xfs_inode_t *dp, /* directory within whose allocate
the inode. */ the inode. */
mode_t mode, mode_t mode,
nlink_t nlink, xfs_nlink_t nlink,
xfs_dev_t rdev, xfs_dev_t rdev,
cred_t *credp, cred_t *credp,
prid_t prid, /* project id */ prid_t prid, /* project id */
......
...@@ -42,7 +42,7 @@ extern int xfs_get_dir_entry (vname_t *, xfs_inode_t **); ...@@ -42,7 +42,7 @@ extern int xfs_get_dir_entry (vname_t *, xfs_inode_t **);
extern int xfs_dir_lookup_int (bhv_desc_t *, uint, vname_t *, xfs_ino_t *, extern int xfs_dir_lookup_int (bhv_desc_t *, uint, vname_t *, xfs_ino_t *,
xfs_inode_t **); xfs_inode_t **);
extern int xfs_truncate_file (xfs_mount_t *, xfs_inode_t *); extern int xfs_truncate_file (xfs_mount_t *, xfs_inode_t *);
extern int xfs_dir_ialloc (xfs_trans_t **, xfs_inode_t *, mode_t, nlink_t, extern int xfs_dir_ialloc (xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t,
xfs_dev_t, cred_t *, prid_t, int, xfs_dev_t, cred_t *, prid_t, int,
xfs_inode_t **, int *); xfs_inode_t **, int *);
extern int xfs_droplink (xfs_trans_t *, xfs_inode_t *); extern int xfs_droplink (xfs_trans_t *, xfs_inode_t *);
......
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