taglinefilesource code
fl33fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l,
fl38fs/locks.cstatic struct file_lock *alloc_lock(struct file_lock **pos, struct file_lock *fl,
fl40fs/locks.cstatic void free_lock(struct file_lock **fl);
fl53fs/locks.cstruct file_lock *fl,file_lock;
fl66fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl67fs/locks.cif (conflict(&file_lock, fl)) {
fl68fs/locks.cflock.l_pid = fl->fl_owner->pid;
fl69fs/locks.cflock.l_start = fl->fl_start;
fl70fs/locks.cflock.l_len = fl->fl_end == OFFSET_MAX ? 0 :
fl71fs/locks.cfl->fl_end - fl->fl_start + 1;
fl72fs/locks.cflock.l_whence = fl->fl_whence;
fl73fs/locks.cflock.l_type = fl->fl_type;
fl92fs/locks.cstruct file_lock *fl,file_lock;
fl136fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl137fs/locks.cif (!conflict(&file_lock, fl))
fl147fs/locks.cif (locks_deadlocked(file_lock.fl_owner->pid,fl->fl_owner->pid)) return -EDEADLOCK;
fl149fs/locks.cinterruptible_sleep_on(&fl->fl_wait);
fl176fs/locks.cstruct file_lock *fl;
fl177fs/locks.cfor (fl = file_lock_table; fl != NULL; fl = fl->fl_nextlink) {
fl178fs/locks.cif (fl->fl_owner == NULL) continue;  /* not a used lock */
fl179fs/locks.cif (fl->fl_owner->pid != my_pid) continue;
fl180fs/locks.cif (fl->fl_wait == NULL) continue;  /* no queues */
fl181fs/locks.cdlock_wait = fl->fl_wait;
fl189fs/locks.c} while (dlock_wait != fl->fl_wait);
fl202fs/locks.cstruct file_lock *fl;
fl208fs/locks.cwhile ((fl = *before) && (task != fl->fl_owner || fd != fl->fl_fd))
fl209fs/locks.cbefore = &fl->fl_next;
fl213fs/locks.cwhile ((fl = *before) && task == fl->fl_owner && fd == fl->fl_fd)
fl222fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l,
fl240fs/locks.cfl->fl_type = l->l_type;
fl241fs/locks.cfl->fl_start = start;  /* we record the absolute position */
fl242fs/locks.cfl->fl_whence = 0;  /* FIXME: do we record {l_start} as passed? */
fl243fs/locks.cif (l->l_len == 0 || (fl->fl_end = start + l->l_len - 1) < 0)
fl244fs/locks.cfl->fl_end = OFFSET_MAX;
fl245fs/locks.cfl->fl_owner = current;
fl246fs/locks.cfl->fl_fd = fd;
fl247fs/locks.cfl->fl_wait = NULL;    /* just for cleanliness */
fl298fs/locks.cstruct file_lock *fl;
fl309fs/locks.cwhile ((fl = *before) &&
fl310fs/locks.c(caller->fl_owner != fl->fl_owner ||
fl311fs/locks.ccaller->fl_fd != fl->fl_fd))
fl312fs/locks.cbefore = &fl->fl_next;
fl318fs/locks.cwhile (   (fl = *before)
fl319fs/locks.c&& caller->fl_owner == fl->fl_owner
fl320fs/locks.c&& caller->fl_fd == fl->fl_fd) {
fl324fs/locks.cif (caller->fl_type == fl->fl_type) {
fl325fs/locks.cif (fl->fl_end < caller->fl_start - 1)
fl331fs/locks.cif (fl->fl_start > caller->fl_end + 1)
fl340fs/locks.cif (fl->fl_start > caller->fl_start)
fl341fs/locks.cfl->fl_start = caller->fl_start;
fl343fs/locks.ccaller->fl_start = fl->fl_start;
fl344fs/locks.cif (fl->fl_end < caller->fl_end)
fl345fs/locks.cfl->fl_end = caller->fl_end;
fl347fs/locks.ccaller->fl_end = fl->fl_end;
fl352fs/locks.ccaller = fl;
fl359fs/locks.cif (fl->fl_end < caller->fl_start)
fl361fs/locks.cif (fl->fl_start > caller->fl_end)
fl365fs/locks.cif (fl->fl_start < caller->fl_start)
fl366fs/locks.cleft = fl;
fl371fs/locks.cif (fl->fl_end > caller->fl_end) {
fl372fs/locks.cright = fl;
fl375fs/locks.cif (fl->fl_start >= caller->fl_start) {
fl389fs/locks.cwake_up(&fl->fl_wait);
fl390fs/locks.cfl->fl_start = caller->fl_start;
fl391fs/locks.cfl->fl_end   = caller->fl_end;
fl392fs/locks.cfl->fl_type  = caller->fl_type;
fl393fs/locks.ccaller = fl;
fl451fs/locks.cstruct file_lock *fl,
fl483fs/locks.ctmp->fl_type = fl->fl_type;
fl484fs/locks.ctmp->fl_whence = fl->fl_whence;
fl485fs/locks.ctmp->fl_start = fl->fl_start;
fl486fs/locks.ctmp->fl_end = fl->fl_end;
fl497fs/locks.cstruct file_lock *fl;
fl499fs/locks.cfl = *fl_p;
fl500fs/locks.cif (fl->fl_owner == NULL)  /* sanity check */
fl505fs/locks.cfl->fl_next = file_lock_free_list;  /* add to free list */
fl506fs/locks.cfile_lock_free_list = fl;
fl507fs/locks.cfl->fl_owner = NULL;      /* for sanity checks */
fl509fs/locks.cwake_up(&fl->fl_wait);