* Return true if the prison is currently valid. A prison is valid if it has * been fully created, and is not being destroyed. Note that dying prisons * are still considered valid. */
| 3077 | * are still considered valid. |
| 3078 | */ |
| 3079 | bool |
| 3080 | prison_isvalid(struct prison *pr) |
| 3081 | { |
| 3082 | |
| 3083 | if (__predict_false(refcount_load(&pr->pr_ref) == 0)) |
| 3084 | return (false); |
| 3085 | return (true); |
| 3086 | } |
| 3087 | |
| 3088 | /* |
| 3089 | * Return 1 if the passed credential is in a jail and that jail does not |
no test coverage detected