X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/1de703daf67320d643c7695d9bf7ec54c33d5512..a6ee311a3eea863feb6f20a916e2e20ed4904014:/sys/vfs/gnu/ext2fs/ext2_vfsops.c diff --git a/sys/vfs/gnu/ext2fs/ext2_vfsops.c b/sys/vfs/gnu/ext2fs/ext2_vfsops.c index ea2aa6dee7..ac68c895b4 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vfsops.c +++ b/sys/vfs/gnu/ext2fs/ext2_vfsops.c @@ -38,7 +38,7 @@ * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.63.2.7 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.2 2003/06/17 04:28:34 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.10 2003/08/20 09:56:31 rob Exp $ */ #include "opt_quota.h" @@ -56,32 +56,33 @@ #include #include #include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include -#include - -static int ext2_fhtovp __P((struct mount *, struct fid *, struct vnode **)); -static int ext2_flushfiles __P((struct mount *mp, int flags, struct proc *p)); -static int ext2_mount __P((struct mount *, - char *, caddr_t, struct nameidata *, struct proc *)); -static int ext2_mountfs __P((struct vnode *, struct mount *, struct proc *)); -static int ext2_reload __P((struct mount *mountp, struct ucred *cred, - struct proc *p)); -static int ext2_sbupdate __P((struct ufsmount *, int)); -static int ext2_statfs __P((struct mount *, struct statfs *, struct proc *)); -static int ext2_sync __P((struct mount *, int, struct ucred *, struct proc *)); -static int ext2_unmount __P((struct mount *, int, struct proc *)); -static int ext2_vget __P((struct mount *, ino_t, struct vnode **)); -static int ext2_vptofh __P((struct vnode *, struct fid *)); +#include "fs.h" +#include "ext2_extern.h" +#include "ext2_fs.h" +#include "ext2_fs_sb.h" + +static int ext2_fhtovp (struct mount *, struct fid *, struct vnode **); +static int ext2_flushfiles (struct mount *mp, int flags, struct thread *td); +static int ext2_mount (struct mount *, + char *, caddr_t, struct nameidata *, struct thread *); +static int ext2_mountfs (struct vnode *, struct mount *, struct thread *); +static int ext2_reload (struct mount *mountp, struct ucred *cred, + struct thread *p); +static int ext2_sbupdate (struct ufsmount *, int); +static int ext2_statfs (struct mount *, struct statfs *, struct thread *); +static int ext2_sync (struct mount *, int, struct thread *); +static int ext2_unmount (struct mount *, int, struct thread *); +static int ext2_vget (struct mount *, ino_t, struct vnode **); +static int ext2_vptofh (struct vnode *, struct fid *); static MALLOC_DEFINE(M_EXT2NODE, "EXT2 node", "EXT2 vnode private part"); @@ -108,14 +109,14 @@ VFS_SET(ext2fs_vfsops, ext2fs, 0); static int ext2fs_inode_hash_lock; -static int ext2_check_sb_compat __P((struct ext2_super_block *es, - dev_t dev, int ronly)); -static int compute_sb_data __P((struct vnode * devvp, +static int ext2_check_sb_compat (struct ext2_super_block *es, + dev_t dev, int ronly); +static int compute_sb_data (struct vnode * devvp, struct ext2_super_block * es, - struct ext2_sb_info * fs)); + struct ext2_sb_info * fs); #ifdef notyet -static int ext2_mountroot __P((void)); +static int ext2_mountroot (void); /* * Called by main() when ext2fs is going to be mounted as root. @@ -127,9 +128,9 @@ static int ext2_mountroot __P((void)); static int ext2_mountroot() { - register struct ext2_sb_info *fs; - register struct mount *mp; - struct proc *p = curproc; + struct ext2_sb_info *fs; + struct mount *mp; + struct thread *td = curthread; struct ufsmount *ump; u_int size; int error; @@ -144,12 +145,12 @@ ext2_mountroot() TAILQ_INIT(&mp->mnt_reservedvnlist); mp->mnt_op = &ext2fs_vfsops; mp->mnt_flag = MNT_RDONLY; - if (error = ext2_mountfs(rootvp, mp, p)) { + if (error = ext2_mountfs(rootvp, mp, td)) { bsd_free(mp, M_MOUNT); return (error); } if (error = vfs_lock(mp)) { - (void)ext2_unmount(mp, 0, p); + (void)ext2_unmount(mp, 0, td); bsd_free(mp, M_MOUNT); return (error); } @@ -165,7 +166,7 @@ ext2_mountroot() (void) copystr(ROOTNAME, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); - (void)ext2_statfs(mp, &mp->mnt_stat, p); + (void)ext2_statfs(mp, &mp->mnt_stat, td); vfs_unlock(mp); inittodr(fs->s_es->s_wtime); /* this helps to set the time */ return (0); @@ -178,23 +179,26 @@ ext2_mountroot() * mount system call */ static int -ext2_mount(mp, path, data, ndp, p) - register struct mount *mp; +ext2_mount(mp, path, data, ndp, td) + struct mount *mp; char *path; caddr_t data; /* this is actually a (struct ufs_args *) */ struct nameidata *ndp; - struct proc *p; + struct thread *td; { struct vnode *devvp; struct ufs_args args; struct ufsmount *ump = 0; - register struct ext2_sb_info *fs; + struct ext2_sb_info *fs; size_t size; int error, flags; mode_t accessmode; + struct ucred *cred; if ((error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args))) != 0) return (error); + + cred = td->td_proc->p_ucred; /* * If updating, check whether changing from read-only to * read/write; if there is no device name, that's all we do. @@ -207,10 +211,10 @@ ext2_mount(mp, path, data, ndp, p) flags = WRITECLOSE; if (mp->mnt_flag & MNT_FORCE) flags |= FORCECLOSE; - if (vfs_busy(mp, LK_NOWAIT, 0, p)) + if (vfs_busy(mp, LK_NOWAIT, 0, td)) return (EBUSY); - error = ext2_flushfiles(mp, flags, p); - vfs_unbusy(mp, p); + error = ext2_flushfiles(mp, flags, td); + vfs_unbusy(mp, td); if (!error && fs->s_wasvalid) { fs->s_es->s_state |= EXT2_VALID_FS; ext2_sbupdate(ump, MNT_WAIT); @@ -218,7 +222,7 @@ ext2_mount(mp, path, data, ndp, p) fs->s_rd_only = 1; } if (!error && (mp->mnt_flag & MNT_RELOAD)) - error = ext2_reload(mp, ndp->ni_cnd.cn_cred, p); + error = ext2_reload(mp, ndp->ni_cnd.cn_cred, td); if (error) return (error); devvp = ump->um_devvp; @@ -230,14 +234,14 @@ ext2_mount(mp, path, data, ndp, p) * If upgrade to read-write by non-root, then verify * that user has necessary permissions on the device. */ - if (p->p_ucred->cr_uid != 0) { - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); + if (cred->cr_uid != 0) { + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); if ((error = VOP_ACCESS(devvp, VREAD | VWRITE, - p->p_ucred, p)) != 0) { - VOP_UNLOCK(devvp, 0, p); + cred, td)) != 0) { + VOP_UNLOCK(devvp, 0, td); return (error); } - VOP_UNLOCK(devvp, 0, p); + VOP_UNLOCK(devvp, 0, td); } if ((fs->s_es->s_state & EXT2_VALID_FS) == 0 || @@ -268,7 +272,7 @@ ext2_mount(mp, path, data, ndp, p) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p); + NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); if ((error = namei(ndp)) != 0) return (error); NDFREE(ndp, NDF_ONLY_PNBUF); @@ -283,20 +287,20 @@ ext2_mount(mp, path, data, ndp, p) * If mount by non-root, then verify that user has necessary * permissions on the device. */ - if (p->p_ucred->cr_uid != 0) { + if (cred->cr_uid != 0) { accessmode = VREAD; if ((mp->mnt_flag & MNT_RDONLY) == 0) accessmode |= VWRITE; - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); - if ((error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) != 0) { + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); + if ((error = VOP_ACCESS(devvp, accessmode, cred, td)) != 0) { vput(devvp); return (error); } - VOP_UNLOCK(devvp, 0, p); + VOP_UNLOCK(devvp, 0, td); } if ((mp->mnt_flag & MNT_UPDATE) == 0) { - error = ext2_mountfs(devvp, mp, p); + error = ext2_mountfs(devvp, mp, td); } else { if (devvp != ump->um_devvp) error = EINVAL; /* needs translation */ @@ -316,7 +320,7 @@ ext2_mount(mp, path, data, ndp, p) (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); - (void)ext2_statfs(mp, &mp->mnt_stat, p); + (void)ext2_statfs(mp, &mp->mnt_stat, td); return (0); } @@ -472,7 +476,7 @@ static int compute_sb_data(devvp, es, fs) for (i = 0; i < db_count; i++) { error = bread(devvp , fsbtodb(fs, logic_sb_block + i + 1), - fs->s_blocksize, NOCRED, &fs->s_group_desc[i]); + fs->s_blocksize, &fs->s_group_desc[i]); if(error) { for (j = 0; j < i; j++) brelse(fs->s_group_desc[j]); @@ -517,17 +521,18 @@ static int compute_sb_data(devvp, es, fs) * 6) re-read inode data for all active vnodes. */ static int -ext2_reload(mountp, cred, p) - register struct mount *mountp; +ext2_reload(mountp, cred, td) + struct mount *mountp; struct ucred *cred; - struct proc *p; + struct thread *td; { - register struct vnode *vp, *nvp, *devvp; + struct vnode *vp, *nvp, *devvp; struct inode *ip; struct buf *bp; struct ext2_super_block * es; struct ext2_sb_info *fs; int error; + int gen; if ((mountp->mnt_flag & MNT_RDONLY) == 0) return (EINVAL); @@ -535,13 +540,13 @@ ext2_reload(mountp, cred, p) * Step 1: invalidate all cached meta-data. */ devvp = VFSTOUFS(mountp)->um_devvp; - if (vinvalbuf(devvp, 0, cred, p, 0, 0)) + if (vinvalbuf(devvp, 0, td, 0, 0)) panic("ext2_reload: dirty1"); /* * Step 2: re-read superblock from disk. * constants have been adjusted for ext2 */ - if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0) + if ((error = bread(devvp, SBLOCK, SBSIZE, &bp)) != 0) return (error); es = (struct ext2_super_block *)bp->b_data; if (ext2_check_sb_compat(es, devvp->v_rdev, 0) != 0) { @@ -561,28 +566,31 @@ ext2_reload(mountp, cred, p) #endif brelse(bp); + gen = lwkt_gettoken(&mntvnode_token); loop: - simple_lock(&mntvnode_slock); for (vp = TAILQ_FIRST(&mountp->mnt_nvnodelist); vp != NULL; vp = nvp) { - if (vp->v_mount != mountp) { - simple_unlock(&mntvnode_slock); - goto loop; - } + KKASSERT(vp->v_mount == mountp); nvp = TAILQ_NEXT(vp, v_nmntvnodes); /* * Step 4: invalidate all inactive vnodes. */ - if (vrecycle(vp, &mntvnode_slock, p)) + if (vrecycle(vp, NULL, td)) { + lwkt_gentoken(&mntvnode_token, &gen); goto loop; + } /* * Step 5: invalidate all cached file data. */ - simple_lock(&vp->v_interlock); - simple_unlock(&mntvnode_slock); - if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) { + lwkt_gettoken(&vp->v_interlock); + if (lwkt_gentoken(&mntvnode_token, &gen)) { + lwkt_reltoken(&vp->v_interlock); goto loop; } - if (vinvalbuf(vp, 0, cred, p, 0, 0)) + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { + lwkt_gentoken(&mntvnode_token, &gen); + goto loop; + } + if (vinvalbuf(vp, 0, td, 0, 0)) panic("ext2_reload: dirty2"); /* * Step 6: re-read inode data for all active vnodes. @@ -590,9 +598,10 @@ loop: ip = VTOI(vp); error = bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), - (int)fs->s_blocksize, NOCRED, &bp); + (int)fs->s_blocksize, &bp); if (error) { vput(vp); + lwkt_reltoken(&mntvnode_token); return (error); } ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data + @@ -600,9 +609,10 @@ loop: &ip->i_din); brelse(bp); vput(vp); - simple_lock(&mntvnode_slock); + if (lwkt_gentoken(&mntvnode_token, &gen)) + goto loop; } - simple_unlock(&mntvnode_slock); + lwkt_reltoken(&mntvnode_token); return (0); } @@ -610,14 +620,14 @@ loop: * Common code for mount and mountroot */ static int -ext2_mountfs(devvp, mp, p) - register struct vnode *devvp; +ext2_mountfs(devvp, mp, td) + struct vnode *devvp; struct mount *mp; - struct proc *p; + struct thread *td; { - register struct ufsmount *ump; + struct ufsmount *ump; struct buf *bp; - register struct ext2_sb_info *fs; + struct ext2_sb_info *fs; struct ext2_super_block * es; dev_t dev = devvp->v_rdev; struct partinfo dpart; @@ -635,7 +645,7 @@ ext2_mountfs(devvp, mp, p) return (error); if (vcount(devvp) > 1 && devvp != rootvp) return (EBUSY); - if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)) != 0) + if ((error = vinvalbuf(devvp, V_SAVE, td, 0, 0)) != 0) return (error); #ifdef READONLY /* turn on this to force it to be read-only */ @@ -643,16 +653,16 @@ ext2_mountfs(devvp, mp, p) #endif ronly = (mp->mnt_flag & MNT_RDONLY) != 0; - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p); - VOP_UNLOCK(devvp, 0, p); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + VOP_UNLOCK(devvp, 0, td); if (error) return (error); if (devvp->v_rdev->si_iosize_max != 0) mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, p) != 0) + if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, td) != 0) size = DEV_BSIZE; else { havepart = 1; @@ -661,7 +671,7 @@ ext2_mountfs(devvp, mp, p) bp = NULL; ump = NULL; - if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0) + if ((error = bread(devvp, SBLOCK, SBSIZE, &bp)) != 0) goto out; es = (struct ext2_super_block *)bp->b_data; if (ext2_check_sb_compat(es, dev, ronly) != 0) { @@ -738,7 +748,7 @@ ext2_mountfs(devvp, mp, p) out: if (bp) brelse(bp); - (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p); + (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, td); if (ump) { bsd_free(ump->um_e2fs->s_es, M_UFSMNT); bsd_free(ump->um_e2fs, M_UFSMNT); @@ -752,13 +762,13 @@ out: * unmount system call */ static int -ext2_unmount(mp, mntflags, p) +ext2_unmount(mp, mntflags, td) struct mount *mp; int mntflags; - struct proc *p; + struct thread *td; { - register struct ufsmount *ump; - register struct ext2_sb_info *fs; + struct ufsmount *ump; + struct ext2_sb_info *fs; int error, flags, ronly, i; flags = 0; @@ -767,7 +777,7 @@ ext2_unmount(mp, mntflags, p) return (EINVAL); flags |= FORCECLOSE; } - if ((error = ext2_flushfiles(mp, flags, p)) != 0) + if ((error = ext2_flushfiles(mp, flags, td)) != 0) return (error); ump = VFSTOUFS(mp); fs = ump->um_e2fs; @@ -793,8 +803,7 @@ ext2_unmount(mp, mntflags, p) ULCK_BUF(fs->s_block_bitmap[i]) ump->um_devvp->v_specmountpoint = NULL; - error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE, - NOCRED, p); + error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE, td); vrele(ump->um_devvp); bsd_free(fs->s_es, M_UFSMNT); bsd_free(fs, M_UFSMNT); @@ -808,12 +817,12 @@ ext2_unmount(mp, mntflags, p) * Flush out all the files in a filesystem. */ static int -ext2_flushfiles(mp, flags, p) - register struct mount *mp; +ext2_flushfiles(mp, flags, td) + struct mount *mp; int flags; - struct proc *p; + struct thread *td; { - register struct ufsmount *ump; + struct ufsmount *ump; int error; #if QUOTA int i; @@ -827,7 +836,7 @@ ext2_flushfiles(mp, flags, p) for (i = 0; i < MAXQUOTAS; i++) { if (ump->um_quotas[i] == NULLVP) continue; - quotaoff(p, mp, i); + quotaoff(td, mp, i); } /* * Here we fall through to vflush again to ensure @@ -844,15 +853,15 @@ ext2_flushfiles(mp, flags, p) * taken from ext2/super.c ext2_statfs */ static int -ext2_statfs(mp, sbp, p) +ext2_statfs(mp, sbp, td) struct mount *mp; - register struct statfs *sbp; - struct proc *p; + struct statfs *sbp; + struct thread *td; { unsigned long overhead; - register struct ufsmount *ump; - register struct ext2_sb_info *fs; - register struct ext2_super_block *es; + struct ufsmount *ump; + struct ext2_sb_info *fs; + struct ext2_super_block *es; int i, nsb; ump = VFSTOUFS(mp); @@ -903,17 +912,17 @@ ext2_statfs(mp, sbp, p) * Note: we are always called with the filesystem marked `MPBUSY'. */ static int -ext2_sync(mp, waitfor, cred, p) +ext2_sync(mp, waitfor, td) struct mount *mp; int waitfor; - struct ucred *cred; - struct proc *p; + struct thread *td; { struct vnode *nvp, *vp; struct inode *ip; struct ufsmount *ump = VFSTOUFS(mp); struct ext2_sb_info *fs; int error, allerror = 0; + int gen; fs = ump->um_e2fs; if (fs->s_dirt != 0 && fs->s_rd_only != 0) { /* XXX */ @@ -923,48 +932,52 @@ ext2_sync(mp, waitfor, cred, p) /* * Write back each (modified) inode. */ - simple_lock(&mntvnode_slock); + gen = lwkt_gettoken(&mntvnode_token); loop: for (vp = TAILQ_FIRST(&mp->mnt_nvnodelist); vp != NULL; vp = nvp) { /* * If the vnode that we are about to sync is no longer * associated with this mount point, start over. */ - if (vp->v_mount != mp) + if (vp->v_mount != mp) { + lwkt_gentoken(&mntvnode_token, &gen); goto loop; - simple_lock(&vp->v_interlock); + } + lwkt_gettoken(&vp->v_interlock); + if (lwkt_gentoken(&mntvnode_token, &gen)) { + lwkt_reltoken(&vp->v_interlock); + goto loop; + } nvp = TAILQ_NEXT(vp, v_nmntvnodes); ip = VTOI(vp); if (vp->v_type == VNON || ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 && (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) { - simple_unlock(&vp->v_interlock); + lwkt_reltoken(&vp->v_interlock); continue; } - simple_unlock(&mntvnode_slock); - error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p); + error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td); if (error) { - simple_lock(&mntvnode_slock); if (error == ENOENT) goto loop; continue; } - if ((error = VOP_FSYNC(vp, cred, waitfor, p)) != 0) + if ((error = VOP_FSYNC(vp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(vp, 0, p); + VOP_UNLOCK(vp, 0, td); vrele(vp); - simple_lock(&mntvnode_slock); + lwkt_gentoken(&mntvnode_token, &gen); } - simple_unlock(&mntvnode_slock); + lwkt_reltoken(&mntvnode_token); /* * Force stale file system control information to be flushed. */ if (waitfor != MNT_LAZY) { - vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p); - if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0) + vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, td); + if ((error = VOP_FSYNC(ump->um_devvp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(ump->um_devvp, 0, p); + VOP_UNLOCK(ump->um_devvp, 0, td); } #if QUOTA qsync(mp); @@ -993,8 +1006,8 @@ ext2_vget(mp, ino, vpp) ino_t ino; struct vnode **vpp; { - register struct ext2_sb_info *fs; - register struct inode *ip; + struct ext2_sb_info *fs; + struct inode *ip; struct ufsmount *ump; struct buf *bp; struct vnode *vp; @@ -1016,7 +1029,7 @@ restart: if (ext2fs_inode_hash_lock) { while (ext2fs_inode_hash_lock) { ext2fs_inode_hash_lock = -1; - tsleep(&ext2fs_inode_hash_lock, PVM, "e2vget", 0); + tsleep(&ext2fs_inode_hash_lock, 0, "e2vget", 0); } goto restart; } @@ -1041,7 +1054,7 @@ restart: return (error); } bzero((caddr_t)ip, sizeof(struct inode)); - lockinit(&ip->i_lock, PINOD, "ext2in", 0, 0); + lockinit(&ip->i_lock, 0, "ext2in", 0, 0); vp->v_data = ip; ip->i_vnode = vp; ip->i_e2fs = fs = ump->um_e2fs; @@ -1068,7 +1081,7 @@ restart: printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino))); #endif if ((error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)), - (int)fs->s_blocksize, NOCRED, &bp)) != 0) { + (int)fs->s_blocksize, &bp)) != 0) { /* * The inode does not contain anything useful, so it would * be misleading to leave it on its hash chain. With mode @@ -1141,11 +1154,11 @@ printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino))); */ static int ext2_fhtovp(mp, fhp, vpp) - register struct mount *mp; + struct mount *mp; struct fid *fhp; struct vnode **vpp; { - register struct ufid *ufhp; + struct ufid *ufhp; struct ext2_sb_info *fs; ufhp = (struct ufid *)fhp; @@ -1165,8 +1178,8 @@ ext2_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; { - register struct inode *ip; - register struct ufid *ufhp; + struct inode *ip; + struct ufid *ufhp; ip = VTOI(vp); ufhp = (struct ufid *)fhp; @@ -1184,9 +1197,9 @@ ext2_sbupdate(mp, waitfor) struct ufsmount *mp; int waitfor; { - register struct ext2_sb_info *fs = mp->um_e2fs; - register struct ext2_super_block *es = fs->s_es; - register struct buf *bp; + struct ext2_sb_info *fs = mp->um_e2fs; + struct ext2_super_block *es = fs->s_es; + struct buf *bp; int error = 0; /* printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");