+ if (flags & UPL_NOCOMMIT) {
+ must_commit = 0;
+ }
+
+ if (flags & UPL_IGNORE_VALID_PAGE_CHECK) {
+ ignore_valid_page_check = 1;
+ }
+
+ /*
+ * This call is non-blocking and does not ever fail but it can
+ * only be made when there is other explicit synchronization
+ * with reclaiming of the vnode which, in this path, is provided
+ * by the paging in progress counter.
+ *
+ * In addition, this may also be entered via vm_swapfile_io
+ * where the existing iocount provides the necessary synchronization.
+ * Ideally we would not take an additional iocount here in the cases
+ * where an explcit iocount has already been taken but this call
+ * doesn't cause a deadlock as other forms of vnode_get* might if
+ * this thread has already taken an iocount.
+ */
+ error = vnode_getalways_from_pager(vp);
+ if (error != 0) {
+ /* This can't happen */
+ panic("vnode_getalways returned %d for vp %p", error, vp);
+ }