- splx(s);
- if (error) {
- ubc_upl_abort_range(vpupl, offset, PAGE_SIZE,
- UPL_ABORT_FREE_ON_EMPTY);
- result = error = PAGER_ERROR;
- offset += PAGE_SIZE;
- isize -= PAGE_SIZE;
- pg_index++;
- continue;
- }
- } else if ((bp = incore(vp, blkno)) &&
- ISSET(bp->b_flags, B_BUSY | B_NEEDCOMMIT)) {
- splx(s);
- ubc_upl_abort_range(vpupl, offset, PAGE_SIZE,
- UPL_ABORT_FREE_ON_EMPTY);
- result = error = PAGER_ERROR;
- offset += PAGE_SIZE;
- isize -= PAGE_SIZE;
- pg_index++;
- continue;
- } else if (bp) {
- bremfree(bp);
- SET(bp->b_flags, B_BUSY | B_INVAL );
- splx(s);
- brelse(bp);
- } else
- splx(s);
-
- ubc_upl_commit_range(vpupl, offset, PAGE_SIZE,
- UPL_COMMIT_FREE_ON_EMPTY);
+ else
+#endif
+ {
+ blkno = ubc_offtoblk(vp, (off_t)(f_offset + offset));
+ error = buf_invalblkno(vp, blkno, 0);
+ }
+ if (error) {
+ if ( !(flags & UPL_NOCOMMIT))
+ ubc_upl_abort_range(upl, offset, PAGE_SIZE, UPL_ABORT_FREE_ON_EMPTY);
+ if (error_ret == 0)
+ error_ret = error;
+ result = PAGER_ERROR;
+
+ } else if ( !(flags & UPL_NOCOMMIT)) {
+ ubc_upl_commit_range(upl, offset, PAGE_SIZE, UPL_COMMIT_FREE_ON_EMPTY);
+ }