emulators/open-vm-tools: fix build after 2587b74c6187 removed NDF_ONLY_PNBUF

After base commit 2587b74c6187, which removed NDF_ONLY_PNBUF,
emulators/open-vm-tools fails to build, with:

--- vfsops.o ---
vfsops.c:190:16: error: use of undeclared identifier 'NDF_ONLY_PNBUF'; did you mean 'NDFREE_PNBUF'?
   NDFREE(ndp, NDF_ONLY_PNBUF);
               ^~~~~~~~~~~~~~
               NDFREE_PNBUF
/usr/src/sys/sys/namei.h:291:6: note: 'NDFREE_PNBUF' declared here
void NDFREE_PNBUF(struct nameidata *);
     ^

Indeed, NDFREE_PNBUF() should now be used.

PR:		263041
Approved by:	garga (maintainer)
MFH:		2022Q2
This commit is contained in:
Dimitry Andric 2022-04-04 17:21:54 +02:00
parent 40fc75fc37
commit c55c6dd676

View file

@ -12,7 +12,7 @@
VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp);
/*
@@ -171,7 +176,11 @@ VMBlockVFSMount(struct mount *mp, // IN: mount(
@@ -171,14 +176,22 @@ VMBlockVFSMount(struct mount *mp, // IN: mount(
* Find lower node and lock if not already locked.
*/
@ -24,7 +24,18 @@
error = namei(ndp);
if (error) {
NDFREE(ndp, 0);
@@ -276,6 +285,11 @@ VMBlockVFSUnmount(struct mount *mp, // IN: filesyst
uma_zfree(VMBlockPathnameZone, pathname);
return error;
}
+#ifdef NDF_ONLY_PNBUF
NDFREE(ndp, NDF_ONLY_PNBUF);
+#else
+ NDFREE_PNBUF(ndp);
+#endif
/*
* Check multi VMBlock mount to avoid `lock against myself' panic.
@@ -276,6 +289,11 @@ VMBlockVFSUnmount(struct mount *mp, // IN: filesyst
void *mntdata;
int error;
int flags = 0, removed = 0;