Fixes refcnt in devmnt
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 Jan 2014 21:13:03 +0000 (13:13 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 Jan 2014 21:13:56 +0000 (13:13 -0800)
Using krefs directly.

kern/drivers/dev/mnt.c
kern/include/ns.h

index 79bbf41..d93934d 100644 (file)
@@ -456,7 +456,7 @@ mntwalk(struct chan *c, struct chan *nc, char **name, int nname)
                if(wq->clone != c){
                        wq->clone->type = c->type;
                        wq->clone->mchan = c->mchan;
-                       incref(&c->mchan->ref);
+                       kref_get(&c->mchan->ref, 1);
                }
                if(r->reply.nwqid > 0)
                        wq->clone->qid = r->reply.wqid[r->reply.nwqid-1];
index eb191f1..1b13ee2 100644 (file)
@@ -721,7 +721,6 @@ void                hnputs(void*, uint16_t);
 struct block*          iallocb(int);
 void           iallocsummary(void);
 void           ilock(spinlock_t*);
-int            incref(struct kref*);
 int            iprint( char *unused_char_p_t, ...);
 void           isdir(struct chan*);
 int            iseve(void);