| 2082 | } |
| 2083 | |
| 2084 | int |
| 2085 | finstall_refed(struct thread *td, struct file *fp, int *fd, int flags, |
| 2086 | struct filecaps *fcaps) |
| 2087 | { |
| 2088 | struct filedesc *fdp = td->td_proc->p_fd; |
| 2089 | int error; |
| 2090 | |
| 2091 | MPASS(fd != NULL); |
| 2092 | |
| 2093 | FILEDESC_XLOCK(fdp); |
| 2094 | error = fdalloc(td, 0, fd); |
| 2095 | if (__predict_true(error == 0)) { |
| 2096 | _finstall(fdp, fp, *fd, flags, fcaps); |
| 2097 | } |
| 2098 | FILEDESC_XUNLOCK(fdp); |
| 2099 | return (error); |
| 2100 | } |
| 2101 | |
| 2102 | int |
| 2103 | finstall(struct thread *td, struct file *fp, int *fd, int flags, |
no test coverage detected