Fix kref references that are no longer there.
authorDavid Zhu <yuzhu@cs.berkeley.edu>
Fri, 1 Apr 2011 11:10:58 +0000 (04:10 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:36:01 +0000 (17:36 -0700)
kref changed to p_kref.

kern/src/arsc.c
kern/src/eth_audio.c

index af1dff8..444c8e0 100644 (file)
@@ -35,7 +35,7 @@ intreg_t inline syscall_async(struct proc *p, syscall_req_t *call)
 
 syscall_sring_t* sys_init_arsc(struct proc *p)
 {
-       kref_get(&p->kref, 1);          /* we're storing an external ref here */
+       kref_get(&p->p_kref, 1);                /* we're storing an external ref here */
        syscall_sring_t* sring;
        void * va;
        // TODO: need to pin this page in the future when swapping happens
index 0ed877f..bc7bb87 100644 (file)
@@ -167,7 +167,7 @@ int eth_audio_mmap(struct file *file, struct vm_region *vmr)
        if (active_proc && active_proc != vmr->vm_proc)
                return -1;
        if (!active_proc) {
-               kref_get(&vmr->vm_proc->kref, 1);
+               kref_get(&vmr->vm_proc->p_kref, 1);
                active_proc = vmr->vm_proc;
        }
        assert(page);
@@ -208,7 +208,7 @@ int eth_audio_release(struct inode *inode, struct file *file)
        /* Disconnect the proc from the device, decref. */
        if (active_proc && current) {
                assert(active_proc == current);
-               kref_put(&active_proc->kref);
+               kref_put(&active_proc->p_kref);
                active_proc = 0;
        }
        return 0;