X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/7b8c2c90c660038574b21f6b202a31a3b2baac05:/sys/vfs/gnu/ext2fs/ext2_vnops.c..b993bb87ded5c733e1f0213efbef1be2660b2536:/sys/gnu/vfs/ext2fs/ext2_vnops.c diff --git a/sys/vfs/gnu/ext2fs/ext2_vnops.c b/sys/gnu/vfs/ext2fs/ext2_vnops.c similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2_vnops.c rename to sys/gnu/vfs/ext2fs/ext2_vnops.c index 790ed9a747..74ce07baf1 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vnops.c +++ b/sys/gnu/vfs/ext2fs/ext2_vnops.c @@ -44,7 +44,6 @@ * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 * @(#)ext2_vnops.c 8.7 (Berkeley) 2/3/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.51.2.2 2003/01/02 17:26:18 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.43 2008/06/19 23:27:39 dillon Exp $ */ #include "opt_quota.h" @@ -208,7 +207,7 @@ ext2_fsync(struct vop_fsync_args *ap) struct vnode *vp = ap->a_vp; int count; - /* + /* * XXX why is all this fs specific? */ @@ -221,7 +220,7 @@ ext2_fsync(struct vop_fsync_args *ap) info.vp = vp; loop: info.waitfor = ap->a_waitfor; - count = RB_SCAN(buf_rb_tree, &vp->v_rbdirty_tree, NULL, + count = RB_SCAN(buf_rb_tree, &vp->v_rbdirty_tree, NULL, ext2_fsync_bp, &info); if (count) goto loop; @@ -452,11 +451,11 @@ abortit: */ dp = VTOI(fdvp); ip = VTOI(fvp); - if (ip->i_nlink >= LINK_MAX) { - vn_unlock(fvp); - error = EMLINK; - goto abortit; - } + if (ip->i_nlink >= LINK_MAX) { + vn_unlock(fvp); + error = EMLINK; + goto abortit; + } if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (dp->i_flags & APPEND)) { vn_unlock(fvp); @@ -640,7 +639,7 @@ abortit: * (both directories, or both not directories). */ if ((xp->i_mode&IFMT) == IFDIR) { - if (! ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) || + if (! ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) || xp->i_nlink > 2) { error = ENOTEMPTY; goto bad; @@ -876,7 +875,7 @@ ext2_mkdir(struct vop_old_mkdir_args *ap) * if we are hacking owners here, (only do this where told to) * and we are not giving it TOO root, (would subvert quotas) * then go ahead and give it to the other user. - * The new directory also inherits the SUID bit. + * The new directory also inherits the SUID bit. * If user's UID and dir UID are the same, * 'give it away' so that the SUID is still forced on. */ @@ -905,7 +904,7 @@ ext2_mkdir(struct vop_old_mkdir_args *ap) } #ifdef QUOTA if ((error = ext2_getinoquota(ip)) || - (error = ext2_chkiq(ip, 1, ucp, 0))) { + (error = ext2_chkiq(ip, 1, ucp, 0))) { EXT2_VFREE(tvp, ip->i_number, dmode); vput(tvp); return (error); @@ -958,10 +957,10 @@ ext2_mkdir(struct vop_old_mkdir_args *ap) dirtemplate = *dtp; dirtemplate.dot_ino = ip->i_number; dirtemplate.dotdot_ino = dp->i_number; - /* note that in ext2 DIRBLKSIZ == blocksize, not DEV_BSIZE + /* note that in ext2 DIRBLKSIZ == blocksize, not DEV_BSIZE * so let's just redefine it - for this function only */ -#undef DIRBLKSIZ +#undef DIRBLKSIZ #define DIRBLKSIZ VTOI(dvp)->i_e2fs->s_blocksize dirtemplate.dotdot_reclen = DIRBLKSIZ - 12; error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate, @@ -1100,7 +1099,7 @@ ext2_symlink(struct vop_old_symlink_args *ap) vinitvmio(vp, 0, PAGE_SIZE, -1); error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED, + UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, NULL); if (error) @@ -1168,10 +1167,10 @@ ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, } else { ip->i_uid = cnp->cn_cred->cr_uid; } - + #ifdef QUOTA if ((error = ext2_getinoquota(ip)) || - (error = ext2_chkiq(ip, 1, ucp, 0))) { + (error = ext2_chkiq(ip, 1, ucp, 0))) { EXT2_VFREE(tvp, ip->i_number, mode); vput(tvp); return (error); @@ -1201,7 +1200,7 @@ ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, ip->i_flags |= UF_OPAQUE; /* - * Regular files and directories need VM objects. Softlinks do + * Regular files and directories need VM objects. Softlinks do * not (not immediately anyway). */ if (tvp->v_type == VREG || tvp->v_type == VDIR) @@ -1414,7 +1413,7 @@ ext2_setattr(struct vop_setattr_args *ap) * we are jailed, unless the jail.chflags_allowed sysctl * is set. */ - if (cred->cr_uid == 0 && + if (cred->cr_uid == 0 && (!jailed(cred) || jail_chflags_allowed)) { if ((ip->i_flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) && @@ -1812,7 +1811,7 @@ ext2fifo_close(struct vop_close_args *ap) /* * Kqfilter wrapper for fifos. * - * Fall through to ext2 kqfilter routines if needed + * Fall through to ext2 kqfilter routines if needed */ static int @@ -1926,11 +1925,11 @@ ext2_vinit(struct mount *mntp, struct vnode **vpp) return (0); } -static struct filterops ext2read_filtops = +static struct filterops ext2read_filtops = { FILTEROP_ISFD, NULL, filt_ext2detach, filt_ext2read }; -static struct filterops ext2write_filtops = +static struct filterops ext2write_filtops = { FILTEROP_ISFD, NULL, filt_ext2detach, filt_ext2write }; -static struct filterops ext2vnode_filtops = +static struct filterops ext2vnode_filtops = { FILTEROP_ISFD, NULL, filt_ext2detach, filt_ext2vnode }; /* @@ -1985,7 +1984,7 @@ filt_ext2read(struct knote *kn, long hint) off_t off; /* - * filesystem is gone, so set the EOF flag and schedule + * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ if (hint == NOTE_REVOKE) { @@ -2004,7 +2003,7 @@ static int filt_ext2write(struct knote *kn, long hint) { /* - * filesystem is gone, so set the EOF flag and schedule + * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ if (hint == NOTE_REVOKE) @@ -2112,4 +2111,3 @@ ext2_vnoperatefifo(struct vop_generic_args *ap) { return (VOCALL(&ext2_fifo_vops, ap)); } -