FreeBSD/sys/kern/kern_lockf.c
/*
 * Remove a byte-range lock on an inode.
 *
 * Generally, find the lock (or an overlap to that lock)
 * and remove it (or shrink it), then wakeup anyone we can.
 */
Remove a byte-range lock on an inode.
Generally, find the lock (or an overlap to that lock)
and remove it (or shrink it), then wakeup anyone we can.
Remove a byte - range lock on an inode . Generally find the lock ( or an overlap to that lock ) and remove it ( or shrink it ) then wakeup anyone we can .
static int
lf_clearlock(struct lockf *state, struct lockf_entry *unlock)
{
	struct lockf_entry *overlap;
	overlap = LIST_FIRST(&state->ls_active);
	if (overlap == NOLOCKF)
		return (0);
#ifdef LOCKF_DEBUG
	if (unlock->lf_type != F_UNLCK)
		panic("lf_clearlock: bad type");
	if (lockf_debug & 1)
		lf_print("lf_clearlock", unlock);
#endif 
	lf_activate_lock(state, unlock);
	return (0);
}
static int lf_clearlock ( struct lockf * state , struct lockf_entry * unlock ) { struct lockf_entry * overlap ; overlap = LIST_FIRST ( & state -> ls_active ) ; if ( overlap == NOLOCKF ) return ( 0 ) ; #ifdef LOCKF_DEBUG if ( unlock -> lf_type != F_UNLCK ) panic ( " " ) ; if ( lockf_debug & 1 ) lf_print ( " " , unlock ) ; #endif lf_activate_lock ( state , unlock ) ; return ( 0 ) ; }
Remove a byte-range lock on an inode.
Remove a byte - range lock on an inode .
/* LOCKF_DEBUG */