diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-07-21 21:51:25 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-07-21 21:51:25 +0000 |
commit | 13e34674ce5c20de9a499c7a25f26a57a0ed9a44 (patch) | |
tree | 63a9d8e58d08deece08b6b1383248bfbd116e0c4 /ufs/pager.c | |
parent | a618e283c3ccc837ed7c2aac5ee5c3d7a92160c9 (diff) |
(diskfs_get_filemap): Free initial reference created by pager_create.
Diffstat (limited to 'ufs/pager.c')
-rw-r--r-- | ufs/pager.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ufs/pager.c b/ufs/pager.c index 52e77f05..139e5723 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -459,8 +459,16 @@ diskfs_get_filemap (struct node *np) upi->p = pager_create (upi, pager_bucket, MAY_CACHE, MEMORY_OBJECT_COPY_DELAY); np->dn->fileinfo = upi; + right = pager_get_port (np->dn->fileinfo->p); + ports_port_deref (np->dn->fileinfo->p); } - right = pager_get_port (np->dn->fileinfo->p); + else + /* There is a race condition here. If there are no references + to NP->dn->fileinfo->p, then the clean routine might be + blocked trying to get into node2pagelock, and this call is + invalid. XXX */ + right = pager_get_port (np->dn->fileinfo->p); + spin_unlock (&node2pagelock); mach_port_insert_right (mach_task_self (), right, right, |