svn commit: r367670 - head/sys/ufs/ffs

Konstantin Belousov kib at FreeBSD.org
Sat Nov 14 05:19:45 UTC 2020


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);
 	}
 	/*


More information about the svn-src-head mailing list