diff options
Diffstat (limited to 'sys/gnu/fs/ext2fs')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_lookup.c | 3 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 16 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vnops.c | 17 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/fs.h | 2 |
4 files changed, 18 insertions, 20 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c index 004c140..1d47000 100644 --- a/sys/gnu/fs/ext2fs/ext2_lookup.c +++ b/sys/gnu/fs/ext2fs/ext2_lookup.c @@ -318,7 +318,6 @@ ext2_lookup(ap) struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; - struct thread *td = cnp->cn_thread; ino_t saved_ino; int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->s_blocksize; @@ -657,7 +656,7 @@ found: pdp = vdp; if (flags & ISDOTDOT) { saved_ino = dp->i_ino; - VOP_UNLOCK(pdp, 0, td); /* race to get the inode */ + VOP_UNLOCK(pdp, 0); /* race to get the inode */ error = VFS_VGET(vdp->v_mount, saved_ino, LK_EXCLUSIVE, &tdp); vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 06e42cb..79a5776 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -205,10 +205,10 @@ ext2_mount(mp, td) if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); if (error) { - VOP_UNLOCK(devvp, 0, td); + VOP_UNLOCK(devvp, 0); return (error); } - VOP_UNLOCK(devvp, 0, td); + VOP_UNLOCK(devvp, 0); DROP_GIANT(); g_topology_lock(); error = g_access(ump->um_cp, 0, 1, 0); @@ -520,7 +520,7 @@ ext2_reload(struct mount *mp, struct thread *td) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); if (vinvalbuf(devvp, 0, td, 0, 0) != 0) panic("ext2_reload: dirty1"); - VOP_UNLOCK(devvp, 0, td); + VOP_UNLOCK(devvp, 0); /* * Step 2: re-read superblock from disk. @@ -572,7 +572,7 @@ loop: bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), (int)fs->s_blocksize, NOCRED, &bp); if (error) { - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); vrele(vp); MNT_VNODE_FOREACH_ABORT(mp, mvp); return (error); @@ -580,7 +580,7 @@ loop: ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)), ip); brelse(bp); - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); vrele(vp); MNT_ILOCK(mp); } @@ -614,7 +614,7 @@ ext2_mountfs(devvp, mp, td) error = g_vfs_open(devvp, &cp, "ext2fs", ronly ? 0 : 1); g_topology_unlock(); PICKUP_GIANT(); - VOP_UNLOCK(devvp, 0, td); + VOP_UNLOCK(devvp, 0); if (error) return (error); @@ -907,7 +907,7 @@ loop: } if ((error = VOP_FSYNC(vp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); vrele(vp); MNT_ILOCK(mp); } @@ -919,7 +919,7 @@ loop: vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); if ((error = VOP_FSYNC(ump->um_devvp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(ump->um_devvp, 0, td); + VOP_UNLOCK(ump->um_devvp, 0); } /* * Write back modified superblock. diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index e1b5f4e..eaf7443 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -767,7 +767,6 @@ ext2_rename(ap) struct vnode *fdvp = ap->a_fdvp; struct componentname *tcnp = ap->a_tcnp; struct componentname *fcnp = ap->a_fcnp; - struct thread *td = fcnp->cn_thread; struct inode *ip, *xp, *dp; struct dirtemplate dirbuf; int doingdirectory = 0, oldparent = 0, newparent = 0; @@ -818,13 +817,13 @@ abortit: dp = VTOI(fdvp); ip = VTOI(fvp); if (ip->i_nlink >= LINK_MAX) { - VOP_UNLOCK(fvp, 0, td); + VOP_UNLOCK(fvp, 0); error = EMLINK; goto abortit; } if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (dp->i_flags & APPEND)) { - VOP_UNLOCK(fvp, 0, td); + VOP_UNLOCK(fvp, 0); error = EPERM; goto abortit; } @@ -835,7 +834,7 @@ abortit: if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || (ip->i_flag & IN_RENAME)) { - VOP_UNLOCK(fvp, 0, td); + VOP_UNLOCK(fvp, 0); error = EINVAL; goto abortit; } @@ -863,7 +862,7 @@ abortit: ip->i_nlink++; ip->i_flag |= IN_CHANGE; if ((error = ext2_update(fvp, 1)) != 0) { - VOP_UNLOCK(fvp, 0, td); + VOP_UNLOCK(fvp, 0); goto bad; } @@ -878,7 +877,7 @@ abortit: * call to checkpath(). */ error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - VOP_UNLOCK(fvp, 0, td); + VOP_UNLOCK(fvp, 0); if (oldparent != dp->i_number) newparent = dp->i_number; if (doingdirectory && newparent) { @@ -1264,7 +1263,6 @@ ext2_rmdir(ap) struct vnode *vp = ap->a_vp; struct vnode *dvp = ap->a_dvp; struct componentname *cnp = ap->a_cnp; - struct thread *td = cnp->cn_thread; struct inode *ip, *dp; int error; @@ -1299,7 +1297,7 @@ ext2_rmdir(ap) dp->i_nlink--; dp->i_flag |= IN_CHANGE; cache_purge(dvp); - VOP_UNLOCK(dvp, 0, td); + VOP_UNLOCK(dvp, 0); /* * Truncate inode. The only stuff left * in the directory is "." and "..". The @@ -1312,7 +1310,8 @@ ext2_rmdir(ap) * worry about them later. */ ip->i_nlink -= 2; - error = ext2_truncate(vp, (off_t)0, IO_SYNC, cnp->cn_cred, td); + error = ext2_truncate(vp, (off_t)0, IO_SYNC, cnp->cn_cred, + cnp->cn_thread); cache_purge(ITOV(ip)); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); out: diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h index 157eacb..d9e7000 100644 --- a/sys/gnu/fs/ext2fs/fs.h +++ b/sys/gnu/fs/ext2fs/fs.h @@ -146,7 +146,7 @@ extern u_char *fragtbl[]; */ #define DEVVP(inode) (VFSTOEXT2(ITOV(inode)->v_mount)->um_devvp) #define lock_super(devvp) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY) -#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curthread) +#define unlock_super(devvp) VOP_UNLOCK(devvp, 0) /* * Historically, ext2fs kept it's metadata buffers on the LOCKED queue. Now, |