Lines Matching refs:flp
866 flock_check(vnode_t *vp, flock64_t *flp, offset_t offset, offset_t max) in flock_check() argument
875 switch (flp->l_whence) { in flock_check()
877 start = (u_offset_t)flp->l_start; in flock_check()
882 if (flp->l_start > (max - offset)) in flock_check()
884 start = (u_offset_t)(flp->l_start + offset); in flock_check()
892 if (flp->l_start > (max - (offset_t)vattr.va_size)) in flock_check()
894 start = (u_offset_t)(flp->l_start + (offset_t)vattr.va_size); in flock_check()
905 if (flp->l_len == 0) in flock_check()
907 else if ((offset_t)flp->l_len > 0) { in flock_check()
908 if (flp->l_len > (max - start + 1)) in flock_check()
910 end = (u_offset_t)(start + (flp->l_len - 1)); in flock_check()
919 start += (u_offset_t)flp->l_len; in flock_check()
926 if (flp->l_type == F_UNLCK && flp->l_len > 0 && in flock_check()
928 flp->l_len = 0; in flock_check()
936 flock_get_start(vnode_t *vp, flock64_t *flp, offset_t offset, u_offset_t *start) in flock_get_start() argument
945 switch (flp->l_whence) { in flock_get_start()
947 *start = (u_offset_t)flp->l_start; in flock_get_start()
950 *start = (u_offset_t)(flp->l_start + offset); in flock_get_start()
956 *start = (u_offset_t)(flp->l_start + (offset_t)vattr.va_size); in flock_get_start()