Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Dec 2020 21:28:16 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368614 - head/sys/kern
Message-ID:  <202012132128.0BDLSGeG007801@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012132128.0BDLSGeG007801>