summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 581534a..b003b2c 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -1272,7 +1272,7 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, boolean_t ignerr)
tmpfs_pages_check_avail(tmp, newpages - oldpages) == 0)
return (ENOSPC);
- VM_OBJECT_LOCK(uobj);
+ VM_OBJECT_WLOCK(uobj);
if (newsize < oldsize) {
/*
* Zero the truncated part of the last page.
@@ -1292,9 +1292,9 @@ retry:
} else if (vm_pager_has_page(uobj, idx, NULL, NULL)) {
m = vm_page_alloc(uobj, idx, VM_ALLOC_NORMAL);
if (m == NULL) {
- VM_OBJECT_UNLOCK(uobj);
+ VM_OBJECT_WUNLOCK(uobj);
VM_WAIT;
- VM_OBJECT_LOCK(uobj);
+ VM_OBJECT_WLOCK(uobj);
goto retry;
} else if (m->valid != VM_PAGE_BITS_ALL) {
ma[0] = m;
@@ -1314,7 +1314,7 @@ retry:
if (ignerr)
m = NULL;
else {
- VM_OBJECT_UNLOCK(uobj);
+ VM_OBJECT_WUNLOCK(uobj);
return (EIO);
}
}
@@ -1336,7 +1336,7 @@ retry:
}
}
uobj->size = newpages;
- VM_OBJECT_UNLOCK(uobj);
+ VM_OBJECT_WUNLOCK(uobj);
TMPFS_LOCK(tmp);
tmp->tm_pages_used += (newpages - oldpages);
OpenPOWER on IntegriCloud