Index: ufs_inode.c =================================================================== RCS file: /home/netbsd/src/sys/ufs/ufs/ufs_inode.c,v retrieving revision 1.112 diff -p -u -r1.112 ufs_inode.c --- ufs_inode.c 5 Sep 2020 16:30:13 -0000 1.112 +++ ufs_inode.c 14 Sep 2020 08:03:05 -0000 @@ -260,7 +260,7 @@ ufs_balloc_range(struct vnode *vp, off_t /* * if the allocation succeeded, mark all the pages dirty - * and clear PG_RDONLY on any pages that are now fully backed + * and clear PG_RDONLY on any pages that are now backed * by disk blocks. if the allocation failed, we do not invalidate * the pages since they might have already existed and been dirty, * in which case we need to keep them around. if we created the pages, @@ -274,7 +274,7 @@ ufs_balloc_range(struct vnode *vp, off_t KASSERT((pgs[i]->flags & PG_RELEASED) == 0); if (!error) { if (off <= pagestart + (i << PAGE_SHIFT) && - pagestart + ((i + 1) << PAGE_SHIFT) <= eob) { + pagestart + (i << PAGE_SHIFT) <= eob) { pgs[i]->flags &= ~PG_RDONLY; } uvm_pagemarkdirty(pgs[i], UVM_PAGE_STATUS_DIRTY);