svn commit: r368614 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sun Dec 13 21:28:16 UTC 2020


Author: mjg
Date: Sun Dec 13 21:28:15 2020
New Revision: 368614
URL: https://svnweb.freebsd.org/changeset/base/368614

Log:
  vfs: correctly predict last fdrop on failed open
  
  Arguably since the count is guaranteed to be 1 the code should be modified
  to avoid the work.

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c	Sun Dec 13 19:45:42 2020	(r368613)
+++ head/sys/kern/vfs_syscalls.c	Sun Dec 13 21:28:15 2020	(r368614)
@@ -1229,7 +1229,7 @@ success:
 	return (0);
 bad:
 	KASSERT(indx == -1, ("indx=%d, should be -1", indx));
-	fdrop(fp, td);
+	fdrop_close(fp, td);
 	return (error);
 }
 


More information about the svn-src-head mailing list