Rename rump_cred_destroy() to rump_cred_put() -- they've been

refcounted since forever now.
This commit is contained in:
pooka 2009-05-03 17:09:49 +00:00
parent 3b98424735
commit e3b3da7a9e
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump.h,v 1.15 2009/05/03 16:01:44 pooka Exp $ */
/* $NetBSD: rump.h,v 1.16 2009/05/03 17:09:49 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -120,9 +120,9 @@ void rump_vp_interlock(struct vnode *);
kauth_cred_t rump_cred_create(uid_t, gid_t, size_t, gid_t *);
kauth_cred_t rump_cred_suserget(void);
void rump_cred_destroy(kauth_cred_t);
void rump_cred_put(kauth_cred_t);
#define rump_cred_suserput(c) rump_cred_destroy(c)
#define rump_cred_suserput(c) rump_cred_put(c)
/* COMPAT_NETHACK */
#define WizardMode() rump_cred_suserget()
#define YASD(cred) rump_cred_suserput(cred)

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump.c,v 1.106 2009/05/02 15:20:08 pooka Exp $ */
/* $NetBSD: rump.c,v 1.107 2009/05/03 17:09:49 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.106 2009/05/02 15:20:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.107 2009/05/03 17:09:49 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -404,7 +404,7 @@ rump_clear_curlwp(void)
if (p->p_pid != 0) {
fd_free();
rump_proc_vfs_release(p);
rump_cred_destroy(l->l_cred);
rump_cred_put(l->l_cred);
kmem_free(p, sizeof(*p));
}
kmem_free(l, sizeof(*l));
@ -445,7 +445,7 @@ rump_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups)
}
void
rump_cred_destroy(kauth_cred_t cred)
rump_cred_put(kauth_cred_t cred)
{
kauth_cred_free(cred);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump_vfs.c,v 1.19 2009/05/03 16:01:44 pooka Exp $ */
/* $NetBSD: rump_vfs.c,v 1.20 2009/05/03 17:09:49 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@ -216,7 +216,7 @@ rump_freecn(struct componentname *cnp, int flags)
{
if (flags & RUMPCN_FREECRED)
rump_cred_destroy(cnp->cn_cred);
rump_cred_put(cnp->cn_cred);
if ((flags & RUMPCN_HASNTBUF) == 0) {
if (cnp->cn_flags & SAVENAME) {