fd: annotate finstall with prediction branches

This commit is contained in:
Mateusz Guzik 2020-02-14 11:22:12 +00:00
parent c1b57fa7d3
commit 6ed30ea4c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357908

View File

@ -1978,7 +1978,8 @@ finstall(struct thread *td, struct file *fp, int *fd, int flags,
if (!fhold(fp))
return (EBADF);
FILEDESC_XLOCK(fdp);
if ((error = fdalloc(td, 0, fd))) {
error = fdalloc(td, 0, fd);
if (__predict_false(error != 0)) {
FILEDESC_XUNLOCK(fdp);
fdrop(fp, td);
return (error);