Remove um_i_effnlink_valid, i_spare[] and the ufsmount_u and inode_u
unions, since these were only necessary when ext2fs used ufs code. Reviewed by: mckusick
This commit is contained in:
parent
daa96b6fc2
commit
00b162d018
@ -662,7 +662,6 @@ ffs_mountfs(devvp, mp, td, malloctype)
|
||||
}
|
||||
ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK | M_ZERO);
|
||||
ump->um_malloctype = malloctype;
|
||||
ump->um_i_effnlink_valid = 1;
|
||||
ump->um_fs = malloc((u_long)fs->fs_sbsize, M_UFSMNT,
|
||||
M_WAITOK);
|
||||
ump->um_blkatoff = ffs_blkatoff;
|
||||
|
@ -177,8 +177,7 @@ ifs_getattr(ap)
|
||||
vap->va_fsid = dev2udev(ip->i_dev);
|
||||
vap->va_fileid = ip->i_number;
|
||||
vap->va_mode = ip->i_mode & ~IFMT;
|
||||
vap->va_nlink = VFSTOUFS(vp->v_mount)->um_i_effnlink_valid ?
|
||||
ip->i_effnlink : ip->i_nlink;
|
||||
vap->va_nlink = ip->i_effnlink;
|
||||
vap->va_uid = ip->i_uid;
|
||||
vap->va_gid = ip->i_gid;
|
||||
vap->va_rdev = ip->i_rdev;
|
||||
|
@ -75,12 +75,7 @@ struct inode {
|
||||
ino_t i_number; /* The identity of the inode. */
|
||||
int i_effnlink; /* i_nlink when I/O completes */
|
||||
|
||||
union { /* Associated filesystem. */
|
||||
struct fs *fs; /* FFS */
|
||||
struct ext2_sb_info *e2fs; /* EXT2FS */
|
||||
} inode_u;
|
||||
#define i_fs inode_u.fs
|
||||
#define i_e2fs inode_u.e2fs
|
||||
struct fs *i_fs; /* Associated filesystem superblock. */
|
||||
struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */
|
||||
u_quad_t i_modrev; /* Revision level for NFS lease. */
|
||||
struct lockf *i_lockf;/* Head of byte-level lock list. */
|
||||
@ -93,7 +88,6 @@ struct inode {
|
||||
doff_t i_offset; /* Offset of free space in directory. */
|
||||
ino_t i_ino; /* Inode number of found directory. */
|
||||
u_int32_t i_reclen; /* Size of found directory entry. */
|
||||
u_int32_t i_spare[3]; /* XXX actually non-spare (for ext2fs). */
|
||||
|
||||
struct dirhash *i_dirhash; /* Hashing for large directories */
|
||||
/*
|
||||
|
@ -205,10 +205,8 @@ ufs_fhtovp(mp, ufhp, vpp)
|
||||
return (error);
|
||||
}
|
||||
ip = VTOI(nvp);
|
||||
if (ip->i_mode == 0 ||
|
||||
ip->i_gen != ufhp->ufid_gen ||
|
||||
(VFSTOUFS(mp)->um_i_effnlink_valid ? ip->i_effnlink :
|
||||
ip->i_nlink) <= 0) {
|
||||
if (ip->i_mode == 0 || ip->i_gen != ufhp->ufid_gen ||
|
||||
ip->i_effnlink <= 0) {
|
||||
vput(nvp);
|
||||
*vpp = NULLVP;
|
||||
return (ESTALE);
|
||||
|
@ -310,9 +310,7 @@ ufs_close(ap)
|
||||
* XXX - EAGAIN is returned to prevent vn_close from
|
||||
* repeating the vrele operation.
|
||||
*/
|
||||
if (vp->v_type == VREG &&
|
||||
(VFSTOUFS(vp->v_mount)->um_i_effnlink_valid ?
|
||||
VTOI(vp)->i_effnlink : VTOI(vp)->i_nlink) == 0) {
|
||||
if (vp->v_type == VREG && VTOI(vp)->i_effnlink == 0) {
|
||||
(void) vn_start_write(vp, &mp, V_WAIT);
|
||||
vrele(vp);
|
||||
vn_finished_write(mp);
|
||||
@ -418,8 +416,7 @@ ufs_getattr(ap)
|
||||
vap->va_fsid = dev2udev(ip->i_dev);
|
||||
vap->va_fileid = ip->i_number;
|
||||
vap->va_mode = ip->i_mode & ~IFMT;
|
||||
vap->va_nlink = VFSTOUFS(vp->v_mount)->um_i_effnlink_valid ?
|
||||
ip->i_effnlink : ip->i_nlink;
|
||||
vap->va_nlink = ip->i_effnlink;
|
||||
vap->va_uid = ip->i_uid;
|
||||
vap->va_gid = ip->i_gid;
|
||||
vap->va_rdev = ip->i_rdev;
|
||||
|
@ -66,13 +66,7 @@ struct ufsmount {
|
||||
dev_t um_dev; /* device mounted */
|
||||
struct vnode *um_devvp; /* block device mounted vnode */
|
||||
|
||||
union { /* pointer to superblock */
|
||||
struct fs *fs; /* FFS */
|
||||
struct ext2_sb_info *e2fs; /* EXT2FS */
|
||||
} ufsmount_u;
|
||||
#define um_fs ufsmount_u.fs
|
||||
#define um_e2fs ufsmount_u.e2fs
|
||||
#define um_e2fsb ufsmount_u.e2fs->s_es
|
||||
struct fs *um_fs; /* pointer to superblock */
|
||||
|
||||
struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */
|
||||
struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */
|
||||
@ -85,7 +79,6 @@ struct ufsmount {
|
||||
char um_qflags[MAXQUOTAS]; /* quota specific flags */
|
||||
int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */
|
||||
struct malloc_type *um_malloctype; /* The inodes malloctype */
|
||||
int um_i_effnlink_valid; /* i_effnlink valid? */
|
||||
int (*um_balloc)(struct vnode *, off_t, int, struct ucred *, int, struct buf **);
|
||||
int (*um_blkatoff)(struct vnode *, off_t, char **, struct buf **);
|
||||
int (*um_truncate)(struct vnode *, off_t, int, struct ucred *, struct thread *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user