Date: Sat, 14 Nov 2020 05:19:44 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367670 - head/sys/ufs/ffs Message-ID: <202011140519.0AE5Jikq021147@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Nov 14 05:19:44 2020 New Revision: 367670 URL: https://svnweb.freebsd.org/changeset/base/367670 Log: Revert r367669 to re-commit with proper message Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Sat Nov 14 05:17:04 2020 (r367669) +++ head/sys/ufs/ffs/ffs_inode.c Sat Nov 14 05:19:44 2020 (r367670) @@ -67,17 +67,6 @@ __FBSDID("$FreeBSD$"); static int ffs_indirtrunc(struct inode *, ufs2_daddr_t, ufs2_daddr_t, ufs2_daddr_t, int, ufs2_daddr_t *); -static void -ffs_inode_bwrite(struct vnode *vp, struct buf *bp, int flags) -{ - if ((flags & IO_SYNC) != 0) - bwrite(bp); - else if (DOINGASYNC(vp)) - bdwrite(bp); - else - bawrite(bp); -} - /* * Update the access, modified, and inode change times as specified by the * IN_ACCESS, IN_UPDATE, and IN_CHANGE flags respectively. Write the inode @@ -368,7 +357,12 @@ ffs_truncate(vp, length, flags, cred) DIP_SET(ip, i_size, length); if (bp->b_bufsize == fs->fs_bsize) bp->b_flags |= B_CLUSTEROK; - ffs_inode_bwrite(vp, bp, flags); + if (flags & IO_SYNC) + bwrite(bp); + else if (DOINGASYNC(vp)) + bdwrite(bp); + else + bawrite(bp); UFS_INODE_SET_FLAG(ip, IN_SIZEMOD | IN_CHANGE | IN_UPDATE); return (ffs_update(vp, waitforupdate)); } @@ -484,7 +478,12 @@ ffs_truncate(vp, length, flags, cred) allocbuf(bp, size); if (bp->b_bufsize == fs->fs_bsize) bp->b_flags |= B_CLUSTEROK; - ffs_inode_bwrite(vp, bp, flags); + if (flags & IO_SYNC) + bwrite(bp); + else if (DOINGASYNC(vp)) + bdwrite(bp); + else + bawrite(bp); UFS_INODE_SET_FLAG(ip, IN_SIZEMOD | IN_CHANGE | IN_UPDATE); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011140519.0AE5Jikq021147>