diff options
Diffstat (limited to 'sys/ufs/ext2fs/ext2fs_inode.c')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_inode.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c index 5c76a5956b3..2962628f865 100644 --- a/sys/ufs/ext2fs/ext2fs_inode.c +++ b/sys/ufs/ext2fs/ext2fs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_inode.c,v 1.65 2021/12/12 09:14:59 visa Exp $ */ +/* $OpenBSD: ext2fs_inode.c,v 1.66 2022/08/12 14:30:53 visa Exp $ */ /* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */ /* @@ -387,10 +387,15 @@ done: for (i = 0; i < NDADDR; i++) if (newblks[i] != oip->i_e2fs_blocks[i]) panic("ext2fs_truncate2"); - if (length == 0 && - (!LIST_EMPTY(&ovp->v_cleanblkhd) || - !LIST_EMPTY(&ovp->v_dirtyblkhd))) - panic("ext2fs_truncate3"); + if (length == 0) { + int s; + + s = splbio(); + if (!LIST_EMPTY(&ovp->v_cleanblkhd) || + !LIST_EMPTY(&ovp->v_dirtyblkhd)) + panic("ext2fs_truncate3"); + splx(s); + } #endif /* DIAGNOSTIC */ /* * Put back the real size. |