diff options
author | attilio <attilio@FreeBSD.org> | 2013-02-20 12:03:20 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-02-20 12:03:20 +0000 |
commit | 15bf891afe5ecb096114725fc8e6dc1cc3ef70d6 (patch) | |
tree | 430a1525becbd2674f05fbcf81b84fccc4aa7865 /sys/fs/tmpfs/tmpfs_subr.c | |
parent | 1f1e13ca0304c5d3cab0d4c118678ec546f935bc (diff) | |
download | FreeBSD-src-15bf891afe5ecb096114725fc8e6dc1cc3ef70d6.zip FreeBSD-src-15bf891afe5ecb096114725fc8e6dc1cc3ef70d6.tar.gz |
Rename VM_OBJECT_LOCK(), VM_OBJECT_UNLOCK() and VM_OBJECT_TRYLOCK() to
their "write" versions.
Sponsored by: EMC / Isilon storage division
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 10 |
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); |