Skip to content

Commit

Permalink
emulators/open-vm-tools: fix build after 2587b74c6187 removed NDF_ONL…
Browse files Browse the repository at this point in the history
…Y_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
  • Loading branch information
DimitryAndric committed Apr 4, 2022
1 parent 40fc75f commit c55c6dd
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

Expand All @@ -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;
Expand Down

0 comments on commit c55c6dd

Please sign in to comment.