svn commit: r368614 - head/sys/kern

Mateusz Guzik <[email protected]> Sun, 13 Dec 2020 21:28:16 +0000 (UTC)
Newsgroups gmane.os.freebsd.devel.cvs
Message-ID <202012132128.0BDLSGeG007801__38223.5168524616$1607894903$gmane$org@repo.freebsd.org>
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);
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"