Requires a FILEDESC_{S,X}LOCK held and returns without a ref. */
| 288 | |
| 289 | /* Requires a FILEDESC_{S,X}LOCK held and returns without a ref. */ |
| 290 | static __inline struct file * |
| 291 | fget_locked(struct filedesc *fdp, int fd) |
| 292 | { |
| 293 | |
| 294 | FILEDESC_LOCK_ASSERT(fdp); |
| 295 | |
| 296 | if (__predict_false((u_int)fd >= fdp->fd_nfiles)) |
| 297 | return (NULL); |
| 298 | |
| 299 | return (fdp->fd_ofiles[fd].fde_file); |
| 300 | } |
| 301 | |
| 302 | static __inline struct filedescent * |
| 303 | fdeget_locked(struct filedesc *fdp, int fd) |
no outgoing calls
no test coverage detected