| 834 | } |
| 835 | |
| 836 | int |
| 837 | shm_dotruncate(struct shmfd *shmfd, off_t length) |
| 838 | { |
| 839 | void *rl_cookie; |
| 840 | int error; |
| 841 | |
| 842 | rl_cookie = rangelock_wlock(&shmfd->shm_rl, 0, OFF_MAX, |
| 843 | &shmfd->shm_mtx); |
| 844 | error = shm_dotruncate_cookie(shmfd, length, rl_cookie); |
| 845 | rangelock_unlock(&shmfd->shm_rl, rl_cookie, &shmfd->shm_mtx); |
| 846 | return (error); |
| 847 | } |
| 848 | |
| 849 | /* |
| 850 | * shmfd object management including creation and reference counting |
no test coverage detected