mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-03 23:28:58 +00:00
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.
This commit is contained in:
parent
203affb291
commit
d48c2b8d29
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368614
|
@ -1229,7 +1229,7 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg,
|
|||
return (0);
|
||||
bad:
|
||||
KASSERT(indx == -1, ("indx=%d, should be -1", indx));
|
||||
fdrop(fp, td);
|
||||
fdrop_close(fp, td);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue