Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/lfs/ulfs_vnops.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/lfs/ulfs_vnops.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.41 retrieving revision 1.42 diff -u -p -r1.41 -r1.42 --- src/sys/ufs/lfs/ulfs_vnops.c 2016/06/20 02:25:03 1.41 +++ src/sys/ufs/lfs/ulfs_vnops.c 2016/06/20 02:31:47 1.42 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_vnops.c,v 1.41 2016/06/20 02:25:03 dholland Exp $ */ +/* $NetBSD: ulfs_vnops.c,v 1.42 2016/06/20 02:31:47 dholland Exp $ */ /* from NetBSD: ufs_vnops.c,v 1.224 2014/10/29 01:13:28 christos Exp */ /*- @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ulfs_vnops.c,v 1.41 2016/06/20 02:25:03 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ulfs_vnops.c,v 1.42 2016/06/20 02:31:47 dholland Exp $"); #if defined(_KERNEL_OPT) #include "opt_lfs.h" @@ -1159,75 +1159,6 @@ ulfs_vinit(struct mount *mntp, int (**sp } /* - * Allocate a new inode. - */ -int -ulfs_makeinode(struct vattr *vap, struct vnode *dvp, - const struct ulfs_lookup_results *ulr, - struct vnode **vpp, struct componentname *cnp) -{ - struct inode *ip; - struct vnode *tvp; - int error; - - error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, &tvp); - if (error) - return error; - error = vn_lock(tvp, LK_EXCLUSIVE); - if (error) { - vrele(tvp); - return error; - } - lfs_mark_vnode(tvp); - *vpp = tvp; - ip = VTOI(tvp); - ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE; - ip->i_nlink = 1; - DIP_ASSIGN(ip, nlink, 1); - - /* Authorize setting SGID if needed. */ - if (ip->i_mode & ISGID) { - error = kauth_authorize_vnode(cnp->cn_cred, KAUTH_VNODE_WRITE_SECURITY, - tvp, NULL, genfs_can_chmod(tvp->v_type, cnp->cn_cred, ip->i_uid, - ip->i_gid, MAKEIMODE(vap->va_type, vap->va_mode))); - if (error) { - ip->i_mode &= ~ISGID; - DIP_ASSIGN(ip, mode, ip->i_mode); - } - } - - if (cnp->cn_flags & ISWHITEOUT) { - ip->i_flags |= UF_OPAQUE; - DIP_ASSIGN(ip, flags, ip->i_flags); - } - - /* - * Make sure inode goes to disk before directory entry. - */ - if ((error = lfs_update(tvp, NULL, NULL, UPDATE_DIROP)) != 0) - goto bad; - error = ulfs_direnter(dvp, ulr, tvp, - cnp, ip->i_number, LFS_IFTODT(ip->i_mode), NULL); - if (error) - goto bad; - *vpp = tvp; - return (0); - - bad: - /* - * Write error occurred trying to update the inode - * or the directory so must deallocate the inode. - */ - ip->i_nlink = 0; - DIP_ASSIGN(ip, nlink, 0); - ip->i_flag |= IN_CHANGE; - /* If IN_ADIROP, account for it */ - lfs_unmark_vnode(tvp); - vput(tvp); - return (error); -} - -/* * Allocate len bytes at offset off. */ int