taglinefilesource code
fl27fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l,
fl32fs/locks.cstatic struct file_lock *alloc_lock(struct file_lock **pos, struct file_lock *fl,
fl34fs/locks.cstatic void free_lock(struct file_lock **fl);
fl48fs/locks.cstruct file_lock *fl;
fl50fs/locks.cfor (fl = &file_lock_table[0]; fl < file_lock_table + NR_FILE_LOCKS - 1; fl++) {
fl51fs/locks.cfl->fl_next = fl + 1;
fl52fs/locks.cfl->fl_owner = NULL;
fl64fs/locks.cstruct file_lock *fl,file_lock;
fl77fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl78fs/locks.cif (conflict(&file_lock, fl)) {
fl79fs/locks.cflock.l_pid = fl->fl_owner->pid;
fl80fs/locks.cflock.l_start = fl->fl_start;
fl81fs/locks.cflock.l_len = fl->fl_end == OFFSET_MAX ? 0 :
fl82fs/locks.cfl->fl_end - fl->fl_start + 1;
fl83fs/locks.cflock.l_whence = fl->fl_whence;
fl84fs/locks.cflock.l_type = fl->fl_type;
fl103fs/locks.cstruct file_lock *fl,file_lock;
fl147fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl148fs/locks.cif (!conflict(&file_lock, fl))
fl158fs/locks.cif (locks_deadlocked(file_lock.fl_owner->pid,fl->fl_owner->pid)) return -EDEADLOCK;
fl160fs/locks.cinterruptible_sleep_on(&fl->fl_wait);
fl187fs/locks.cstruct file_lock *fl;
fl188fs/locks.cfor (fl = &file_lock_table[0]; fl < file_lock_table + NR_FILE_LOCKS - 1; fl++) {
fl189fs/locks.cif (fl->fl_owner == NULL) continue;  /* not a used lock */
fl190fs/locks.cif (fl->fl_owner->pid != my_pid) continue;
fl191fs/locks.cif (fl->fl_wait == NULL) continue;  /* no queues */
fl192fs/locks.cdlock_wait = fl->fl_wait;
fl200fs/locks.c} while (dlock_wait != fl->fl_wait);
fl213fs/locks.cstruct file_lock *fl;
fl219fs/locks.cwhile ((fl = *before) && (task != fl->fl_owner || fd != fl->fl_fd))
fl220fs/locks.cbefore = &fl->fl_next;
fl224fs/locks.cwhile ((fl = *before) && task == fl->fl_owner && fd == fl->fl_fd)
fl233fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l,
fl251fs/locks.cfl->fl_type = l->l_type;
fl252fs/locks.cfl->fl_start = start;  /* we record the absolute position */
fl253fs/locks.cfl->fl_whence = 0;  /* FIXME: do we record {l_start} as passed? */
fl254fs/locks.cif (l->l_len == 0 || (fl->fl_end = start + l->l_len - 1) < 0)
fl255fs/locks.cfl->fl_end = OFFSET_MAX;
fl256fs/locks.cfl->fl_owner = current;
fl257fs/locks.cfl->fl_fd = fd;
fl258fs/locks.cfl->fl_wait = NULL;    /* just for cleanliness */
fl309fs/locks.cstruct file_lock *fl;
fl320fs/locks.cwhile ((fl = *before) &&
fl321fs/locks.c(caller->fl_owner != fl->fl_owner ||
fl322fs/locks.ccaller->fl_fd != fl->fl_fd))
fl323fs/locks.cbefore = &fl->fl_next;
fl329fs/locks.cwhile (   (fl = *before)
fl330fs/locks.c&& caller->fl_owner == fl->fl_owner
fl331fs/locks.c&& caller->fl_fd == fl->fl_fd) {
fl335fs/locks.cif (caller->fl_type == fl->fl_type) {
fl336fs/locks.cif (fl->fl_end < caller->fl_start - 1)
fl342fs/locks.cif (fl->fl_start > caller->fl_end + 1)
fl351fs/locks.cif (fl->fl_start > caller->fl_start)
fl352fs/locks.cfl->fl_start = caller->fl_start;
fl354fs/locks.ccaller->fl_start = fl->fl_start;
fl355fs/locks.cif (fl->fl_end < caller->fl_end)
fl356fs/locks.cfl->fl_end = caller->fl_end;
fl358fs/locks.ccaller->fl_end = fl->fl_end;
fl363fs/locks.ccaller = fl;
fl370fs/locks.cif (fl->fl_end < caller->fl_start)
fl372fs/locks.cif (fl->fl_start > caller->fl_end)
fl376fs/locks.cif (fl->fl_start < caller->fl_start)
fl377fs/locks.cleft = fl;
fl382fs/locks.cif (fl->fl_end > caller->fl_end) {
fl383fs/locks.cright = fl;
fl386fs/locks.cif (fl->fl_start >= caller->fl_start) {
fl400fs/locks.cwake_up(&fl->fl_wait);
fl401fs/locks.cfl->fl_start = caller->fl_start;
fl402fs/locks.cfl->fl_end   = caller->fl_end;
fl403fs/locks.cfl->fl_type  = caller->fl_type;
fl404fs/locks.ccaller = fl;
fl459fs/locks.cstruct file_lock *fl,
fl473fs/locks.c*tmp = *fl;
fl490fs/locks.cstruct file_lock *fl;
fl492fs/locks.cfl = *fl_p;
fl493fs/locks.cif (fl->fl_owner == NULL)  /* sanity check */
fl498fs/locks.cfl->fl_next = file_lock_free_list;  /* add to free list */
fl499fs/locks.cfile_lock_free_list = fl;
fl500fs/locks.cfl->fl_owner = NULL;      /* for sanity checks */
fl502fs/locks.cwake_up(&fl->fl_wait);