diff options
author | dim <dim@FreeBSD.org> | 2015-06-20 19:34:50 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-20 19:34:50 +0000 |
commit | e109f99dcb6c95c84bbec22229de29a25491f7c2 (patch) | |
tree | d142d742b698973a366ae768a3f4033924e314c8 /sys/fs/tmpfs/tmpfs_subr.c | |
parent | 238df27d058d0d8912acf0a186d3f43289a0a2b6 (diff) | |
parent | cb167b45a82327b0d6d88e85e3d6e2e326291ee4 (diff) | |
download | FreeBSD-src-e109f99dcb6c95c84bbec22229de29a25491f7c2.zip FreeBSD-src-e109f99dcb6c95c84bbec22229de29a25491f7c2.tar.gz |
Merge ^/head r284188 through r284643.
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 2e35582..6114608 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1031,6 +1031,7 @@ tmpfs_dir_detach(struct vnode *vp, struct tmpfs_dirent *de) tmpfs_free_dirent(tmp, xde); } } + de->td_cookie = de->td_hash; } else RB_REMOVE(tmpfs_dir, head, de); @@ -1320,7 +1321,7 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, boolean_t ignerr) struct tmpfs_mount *tmp; struct tmpfs_node *node; vm_object_t uobj; - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t idx, newpages, oldpages; off_t oldsize; int base, rv; @@ -1367,11 +1368,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(uobj); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) { - ma[0] = m; - rv = vm_pager_get_pages(uobj, ma, 1, 0); - m = vm_page_lookup(uobj, idx); - } else + } else if (m->valid != VM_PAGE_BITS_ALL) + rv = vm_pager_get_pages(uobj, &m, 1, 0); + else /* A cached page was reactivated. */ rv = VM_PAGER_OK; vm_page_lock(m); |