taglinefilesource code
fl25fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l,
fl30fs/locks.cstatic struct file_lock *alloc_lock(struct file_lock **pos, struct file_lock *fl,
fl32fs/locks.cstatic void free_lock(struct file_lock **fl);
fl43fs/locks.cstruct file_lock *fl;
fl45fs/locks.cfor (fl = &file_lock_table[0]; fl < file_lock_table + NR_FILE_LOCKS - 1; fl++) {
fl46fs/locks.cfl->fl_next = fl + 1;
fl47fs/locks.cfl->fl_owner = NULL;
fl59fs/locks.cstruct file_lock *fl,file_lock;
fl72fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl73fs/locks.cif (conflict(&file_lock, fl)) {
fl74fs/locks.cflock.l_pid = fl->fl_owner->pid;
fl75fs/locks.cflock.l_start = fl->fl_start;
fl76fs/locks.cflock.l_len = fl->fl_end == OFFSET_MAX ? 0 :
fl77fs/locks.cfl->fl_end - fl->fl_start + 1;
fl78fs/locks.cflock.l_whence = fl->fl_whence;
fl79fs/locks.cflock.l_type = fl->fl_type;
fl98fs/locks.cstruct file_lock *fl,file_lock;
fl142fs/locks.cfor (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) {
fl143fs/locks.cif (!conflict(&file_lock, fl))
fl153fs/locks.cinterruptible_sleep_on(&fl->fl_wait);
fl176fs/locks.cstruct file_lock *fl;
fl182fs/locks.cwhile ((fl = *before) && (task != fl->fl_owner || fd != fl->fl_fd))
fl183fs/locks.cbefore = &fl->fl_next;
fl187fs/locks.cwhile ((fl = *before) && task == fl->fl_owner && fd == fl->fl_fd)
fl196fs/locks.cstatic int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l,
fl216fs/locks.cfl->fl_type = l->l_type;
fl217fs/locks.cfl->fl_start = start;  /* we record the absolute position */
fl218fs/locks.cfl->fl_whence = 0;  /* FIXME: do we record {l_start} as passed? */
fl219fs/locks.cif (l->l_len == 0 || (fl->fl_end = start + l->l_len - 1) < 0)
fl220fs/locks.cfl->fl_end = OFFSET_MAX;
fl221fs/locks.cfl->fl_owner = current;
fl222fs/locks.cfl->fl_fd = fd;
fl223fs/locks.cfl->fl_wait = NULL;    /* just for cleanliness */
fl274fs/locks.cstruct file_lock *fl;
fl285fs/locks.cwhile ((fl = *before) &&
fl286fs/locks.c(caller->fl_owner != fl->fl_owner ||
fl287fs/locks.ccaller->fl_fd != fl->fl_fd))
fl288fs/locks.cbefore = &fl->fl_next;
fl294fs/locks.cwhile (   (fl = *before)
fl295fs/locks.c&& caller->fl_owner == fl->fl_owner
fl296fs/locks.c&& caller->fl_fd == fl->fl_fd) {
fl300fs/locks.cif (caller->fl_type == fl->fl_type) {
fl301fs/locks.cif (fl->fl_end < caller->fl_start - 1)
fl307fs/locks.cif (fl->fl_start > caller->fl_end + 1)
fl316fs/locks.cif (fl->fl_start > caller->fl_start)
fl317fs/locks.cfl->fl_start = caller->fl_start;
fl319fs/locks.ccaller->fl_start = fl->fl_start;
fl320fs/locks.cif (fl->fl_end < caller->fl_end)
fl321fs/locks.cfl->fl_end = caller->fl_end;
fl323fs/locks.ccaller->fl_end = fl->fl_end;
fl328fs/locks.ccaller = fl;
fl335fs/locks.cif (fl->fl_end < caller->fl_start)
fl337fs/locks.cif (fl->fl_start > caller->fl_end)
fl341fs/locks.cif (fl->fl_start < caller->fl_start)
fl342fs/locks.cleft = fl;
fl347fs/locks.cif (fl->fl_end > caller->fl_end) {
fl348fs/locks.cright = fl;
fl351fs/locks.cif (fl->fl_start >= caller->fl_start) {
fl365fs/locks.cwake_up(&fl->fl_wait);
fl366fs/locks.cfl->fl_start = caller->fl_start;
fl367fs/locks.cfl->fl_end   = caller->fl_end;
fl368fs/locks.cfl->fl_type  = caller->fl_type;
fl369fs/locks.ccaller = fl;
fl410fs/locks.cstruct file_lock *fl,
fl424fs/locks.c*tmp = *fl;
fl441fs/locks.cstruct file_lock *fl;
fl443fs/locks.cfl = *fl_p;
fl444fs/locks.cif (fl->fl_owner == NULL)  /* sanity check */
fl449fs/locks.cfl->fl_next = file_lock_free_list;  /* add to free list */
fl450fs/locks.cfile_lock_free_list = fl;
fl451fs/locks.cfl->fl_owner = NULL;      /* for sanity checks */
fl453fs/locks.cwake_up(&fl->fl_wait);