diff options
author | alc <alc@FreeBSD.org> | 2003-10-04 23:37:38 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-10-04 23:37:38 +0000 |
commit | 44ee8e221156e7d2f2a088fdea3361cdc9902479 (patch) | |
tree | df18450ad817f3598140d2138264f967410f60ff /sys/fs/nwfs | |
parent | 74f19ddd0e60157ed1517ea26258f4b89b688bea (diff) | |
download | FreeBSD-src-44ee8e221156e7d2f2a088fdea3361cdc9902479.zip FreeBSD-src-44ee8e221156e7d2f2a088fdea3361cdc9902479.tar.gz |
Synchronize access to a vm page's valid field using the containing
vm object's lock.
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r-- | sys/fs/nwfs/nwfs_io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index a64b844..d0ab8e5 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -440,8 +440,7 @@ nwfs_getpages(ap) relpbuf(bp, &nwfs_pbuf_freecnt); - if (error) - VM_OBJECT_LOCK(object); + VM_OBJECT_LOCK(object); if (error && (uio.uio_resid == count)) { printf("nwfs_getpages: error %d\n",error); vm_page_lock_queues(); @@ -497,8 +496,7 @@ nwfs_getpages(ap) } } vm_page_unlock_queues(); - if (error) - VM_OBJECT_UNLOCK(object); + VM_OBJECT_UNLOCK(object); return 0; #endif /* NWFS_RWCACHE */ } |