summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver/nfs_srvsubs.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-03-20 10:07:52 +0000
committerjeff <jeff@FreeBSD.org>2002-03-20 10:07:52 +0000
commit5cc8ffe0d4d9b652c6008e25f3fc1c6a8fd51976 (patch)
tree397a2dd149ec84023ae2f0cdea08eb53dc029e8d /sys/nfsserver/nfs_srvsubs.c
parentd0f60a59c9bb4d69370dd8ce40f1baf9c6f26046 (diff)
downloadFreeBSD-src-5cc8ffe0d4d9b652c6008e25f3fc1c6a8fd51976.zip
FreeBSD-src-5cc8ffe0d4d9b652c6008e25f3fc1c6a8fd51976.tar.gz
Remove references to vm_zone.h and switch over to the new uma API.
Diffstat (limited to 'sys/nfsserver/nfs_srvsubs.c')
-rw-r--r--sys/nfsserver/nfs_srvsubs.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index a8b0b83..169e810 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
-#include <vm/vm_zone.h>
+#include <vm/uma.h>
#include <nfs/rpcv2.h>
#include <nfs/nfsproto.h>
@@ -605,7 +605,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
struct componentname *cnp = &ndp->ni_cnd;
*retdirp = (struct vnode *)0;
- cnp->cn_pnbuf = zalloc(namei_zone);
+ cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
/*
* Copy the name from the mbuf list to ndp->ni_pnbuf
@@ -670,7 +670,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
* Oh joy. For WebNFS, handle those pesky '%' escapes,
* and the 'native path' indicator.
*/
- cp = zalloc(namei_zone);
+ cp = uma_zalloc(namei_zone, M_WAITOK);
fromcp = cnp->cn_pnbuf;
tocp = cp;
if ((unsigned char)*fromcp >= WEBNFS_SPECCHAR_START) {
@@ -688,7 +688,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
*/
default:
error = EIO;
- zfree(namei_zone, cp);
+ uma_zfree(namei_zone, cp);
goto out;
}
}
@@ -704,14 +704,14 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
continue;
} else {
error = ENOENT;
- zfree(namei_zone, cp);
+ uma_zfree(namei_zone, cp);
goto out;
}
} else
*tocp++ = *fromcp++;
}
*tocp = '\0';
- zfree(namei_zone, cnp->cn_pnbuf);
+ uma_zfree(namei_zone, cnp->cn_pnbuf);
cnp->cn_pnbuf = cp;
}
@@ -760,7 +760,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
if (cnp->cn_flags & (SAVENAME | SAVESTART))
cnp->cn_flags |= HASBUF;
else
- zfree(namei_zone, cnp->cn_pnbuf);
+ uma_zfree(namei_zone, cnp->cn_pnbuf);
break;
}
@@ -779,7 +779,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
goto badlink2;
}
if (ndp->ni_pathlen > 1)
- cp = zalloc(namei_zone);
+ cp = uma_zalloc(namei_zone, M_WAITOK);
else
cp = cnp->cn_pnbuf;
aiov.iov_base = cp;
@@ -795,7 +795,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
if (error) {
badlink1:
if (ndp->ni_pathlen > 1)
- zfree(namei_zone, cp);
+ uma_zfree(namei_zone, cp);
badlink2:
vrele(ndp->ni_dvp);
vput(ndp->ni_vp);
@@ -816,7 +816,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
*/
if (ndp->ni_pathlen > 1) {
bcopy(ndp->ni_next, cp + linklen, ndp->ni_pathlen);
- zfree(namei_zone, cnp->cn_pnbuf);
+ uma_zfree(namei_zone, cnp->cn_pnbuf);
cnp->cn_pnbuf = cp;
} else
cnp->cn_pnbuf[linklen] = '\0';
@@ -848,7 +848,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
*/
out:
if (error) {
- zfree(namei_zone, cnp->cn_pnbuf);
+ uma_zfree(namei_zone, cnp->cn_pnbuf);
ndp->ni_vp = NULL;
ndp->ni_dvp = NULL;
ndp->ni_startdir = NULL;
OpenPOWER on IntegriCloud