taglinefilesource code
fl46fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l);
fl50fs/locks.cstatic struct file_lock *alloc_lock(struct file_lock **pos, struct file_lock *fl);
fl51fs/locks.cstatic void free_lock(struct file_lock **fl);
fl63fs/locks.cstruct file_lock *fl,file_lock;
fl76fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl77fs/locks.cif (conflict(&file_lock, fl)) {
fl78fs/locks.cflock.l_pid = fl->fl_owner->pid;
fl79fs/locks.cflock.l_start = fl->fl_start;
fl80fs/locks.cflock.l_len = fl->fl_end == OFFSET_MAX ? 0 :
fl81fs/locks.cfl->fl_end - fl->fl_start + 1;
fl82fs/locks.cflock.l_whence = fl->fl_whence;
fl83fs/locks.cflock.l_type = fl->fl_type;
fl102fs/locks.cstruct file_lock *fl,file_lock;
fl146fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl147fs/locks.cif (!conflict(&file_lock, fl))
fl157fs/locks.cif (locks_deadlocked(file_lock.fl_owner->pid,fl->fl_owner->pid))
fl160fs/locks.cinterruptible_sleep_on(&fl->fl_wait);
fl187fs/locks.cstruct file_lock *fl;
fl188fs/locks.cfor (fl = file_lock_table; fl != NULL; fl = fl->fl_nextlink) {
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;
fl202fs/locks.c} while (dlock_wait != fl->fl_wait);
fl214fs/locks.cstruct file_lock *fl;
fl220fs/locks.cwhile ((fl = *before) && task != fl->fl_owner)
fl221fs/locks.cbefore = &fl->fl_next;
fl225fs/locks.cwhile ((fl = *before) && task == fl->fl_owner)
fl234fs/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_wait = NULL;    /* just for cleanliness */
fl307fs/locks.cstruct file_lock *fl;
fl318fs/locks.cwhile ((fl = *before) && caller->fl_owner != fl->fl_owner)
fl319fs/locks.cbefore = &fl->fl_next;
fl325fs/locks.cwhile ((fl = *before) && caller->fl_owner == fl->fl_owner) {
fl329fs/locks.cif (caller->fl_type == fl->fl_type) {
fl330fs/locks.cif (fl->fl_end < caller->fl_start - 1)
fl336fs/locks.cif (fl->fl_start > caller->fl_end + 1)
fl345fs/locks.cif (fl->fl_start > caller->fl_start)
fl346fs/locks.cfl->fl_start = caller->fl_start;
fl348fs/locks.ccaller->fl_start = fl->fl_start;
fl349fs/locks.cif (fl->fl_end < caller->fl_end)
fl350fs/locks.cfl->fl_end = caller->fl_end;
fl352fs/locks.ccaller->fl_end = fl->fl_end;
fl357fs/locks.ccaller = fl;
fl364fs/locks.cif (fl->fl_end < caller->fl_start)
fl366fs/locks.cif (fl->fl_start > caller->fl_end)
fl370fs/locks.cif (fl->fl_start < caller->fl_start)
fl371fs/locks.cleft = fl;
fl376fs/locks.cif (fl->fl_end > caller->fl_end) {
fl377fs/locks.cright = fl;
fl380fs/locks.cif (fl->fl_start >= caller->fl_start) {
fl394fs/locks.cwake_up(&fl->fl_wait);
fl395fs/locks.cfl->fl_start = caller->fl_start;
fl396fs/locks.cfl->fl_end   = caller->fl_end;
fl397fs/locks.cfl->fl_type  = caller->fl_type;
fl398fs/locks.ccaller = fl;
fl452fs/locks.cstruct file_lock *fl)
fl472fs/locks.ctmp->fl_type = fl->fl_type;
fl473fs/locks.ctmp->fl_whence = fl->fl_whence;
fl474fs/locks.ctmp->fl_start = fl->fl_start;
fl475fs/locks.ctmp->fl_end = fl->fl_end;
fl486fs/locks.cstruct file_lock *fl;
fl488fs/locks.cfl = *fl_p;
fl491fs/locks.cif (fl->fl_nextlink != NULL)
fl492fs/locks.cfl->fl_nextlink->fl_prevlink = fl->fl_prevlink;
fl494fs/locks.cif (fl->fl_prevlink != NULL)
fl495fs/locks.cfl->fl_prevlink->fl_nextlink = fl->fl_nextlink;
fl497fs/locks.cfile_lock_table = fl->fl_nextlink;
fl499fs/locks.cwake_up(&fl->fl_wait);
fl501fs/locks.ckfree(fl);