svn commit: r359668 - head/sys/ufs/ffs
Kirk McKusick
mckusick at FreeBSD.org
Mon Apr 6 20:23:48 UTC 2020
Author: mckusick
Date: Mon Apr 6 20:23:47 2020
New Revision: 359668
URL: https://svnweb.freebsd.org/changeset/base/359668
Log:
Revert -r359612 as it can cause other panics.
An updated version will be made when the issue has been resolved.
Reported by: Peter Holm
Modified:
head/sys/ufs/ffs/ffs_inode.c
Modified: head/sys/ufs/ffs/ffs_inode.c
==============================================================================
--- head/sys/ufs/ffs/ffs_inode.c Mon Apr 6 19:45:26 2020 (r359667)
+++ head/sys/ufs/ffs/ffs_inode.c Mon Apr 6 20:23:47 2020 (r359668)
@@ -426,6 +426,11 @@ ffs_truncate(vp, length, flags, cred)
ip->i_size = length;
DIP_SET(ip, i_size, length);
} else {
+ lbn = lblkno(fs, length);
+ flags |= BA_CLRBUF;
+ error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp);
+ if (error)
+ return (error);
/*
* When we are doing soft updates and the UFS_BALLOC
* above fills in a direct block hole with a full sized
@@ -434,14 +439,9 @@ ffs_truncate(vp, length, flags, cred)
* so that we do not get a soft updates inconsistency
* when we create the fragment below.
*/
- lbn = lblkno(fs, length);
if (DOINGSOFTDEP(vp) && lbn < UFS_NDADDR &&
fragroundup(fs, blkoff(fs, length)) < fs->fs_bsize &&
(error = ffs_syncvnode(vp, MNT_WAIT, 0)) != 0)
- return (error);
- flags |= BA_CLRBUF;
- error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp);
- if (error)
return (error);
ip->i_size = length;
DIP_SET(ip, i_size, length);
More information about the svn-src-head
mailing list