Lines Matching defs:flc

72 static struct file_lock *file_lock(struct file_lock_core *flc)
74 return container_of(flc, struct file_lock, c);
77 static struct file_lease *file_lease(struct file_lock_core *flc)
79 return container_of(flc, struct file_lease, c);
211 struct file_lock_core *flc;
213 list_for_each_entry(flc, list, flc_list)
215 list_type, flc->flc_owner, flc->flc_flags,
216 flc->flc_type, flc->flc_pid);
239 struct file_lock_core *flc;
242 list_for_each_entry(flc, list, flc_list)
243 if (flc->flc_file == filp)
248 flc->flc_owner, flc->flc_flags,
249 flc->flc_type, flc->flc_pid);
263 static void locks_init_lock_heads(struct file_lock_core *flc)
265 INIT_HLIST_NODE(&flc->flc_link);
266 INIT_LIST_HEAD(&flc->flc_list);
267 INIT_LIST_HEAD(&flc->flc_blocked_requests);
268 INIT_LIST_HEAD(&flc->flc_blocked_member);
269 init_waitqueue_head(&flc->flc_wait);
298 struct file_lock_core *flc = &fl->c;
300 BUG_ON(waitqueue_active(&flc->flc_wait));
301 BUG_ON(!list_empty(&flc->flc_list));
302 BUG_ON(!list_empty(&flc->flc_blocked_requests));
303 BUG_ON(!list_empty(&flc->flc_blocked_member));
304 BUG_ON(!hlist_unhashed(&flc->flc_link));
314 fl->fl_lmops->lm_put_owner(flc->flc_owner);
315 flc->flc_owner = NULL;
333 struct file_lock_core *flc;
336 list_for_each_entry(flc, &flctx->flc_posix, flc_list) {
337 if (flc->flc_owner != owner)
339 if (!list_empty(&flc->flc_blocked_requests)) {
367 struct file_lock_core *flc;
370 flc = list_first_entry(dispose, struct file_lock_core, flc_list);
371 list_del_init(&flc->flc_list);
372 if (flc->flc_flags & (FL_LEASE|FL_DELEG|FL_LAYOUT))
373 locks_free_lease(file_lease(flc));
375 locks_free_lock(file_lock(flc));
477 static int assign_type(struct file_lock_core *flc, int type)
483 flc->flc_type = type;
636 static void locks_insert_global_locks(struct file_lock_core *flc)
643 flc->flc_link_cpu = smp_processor_id();
644 hlist_add_head(&flc->flc_link, &fll->hlist);
649 static void locks_delete_global_locks(struct file_lock_core *flc)
660 if (hlist_unhashed(&flc->flc_link))
663 fll = per_cpu_ptr(&file_lock_list, flc->flc_link_cpu);
665 hlist_del_init(&flc->flc_link);
670 posix_owner_key(struct file_lock_core *flc)
672 return (unsigned long) flc->flc_owner;
802 struct file_lock_core *flc;
806 list_for_each_entry(flc, &blocker->flc_blocked_requests, flc_blocked_member)
807 if (conflict(flc, waiter)) {
808 blocker = flc;
1029 struct file_lock_core *flc;
1031 hash_for_each_possible(blocked_hash, flc, flc_link, posix_owner_key(blocker)) {
1032 if (posix_same_owner(flc, blocker)) {
1033 while (flc->flc_blocker)
1034 flc = flc->flc_blocker;
1035 return flc;
1518 struct file_lock_core *flc;
1522 list_for_each_entry(flc, &ctx->flc_lease, flc_list) {
1523 if (leases_conflict(flc, &breaker->c))
1660 struct file_lock_core *flc;
1665 flc = list_first_entry_or_null(&ctx->flc_lease,
1667 if (flc && flc->flc_type == F_WRLCK)
2760 static void lock_get_status(struct seq_file *f, struct file_lock_core *flc,
2766 int type = flc->flc_type;
2767 struct file_lock *fl = file_lock(flc);
2769 pid = locks_translate_pid(flc, proc_pidns);
2776 if (flc->flc_file != NULL)
2777 inode = file_inode(flc->flc_file);
2784 if (flc->flc_flags & FL_POSIX) {
2785 if (flc->flc_flags & FL_ACCESS)
2787 else if (flc->flc_flags & FL_OFDLCK)
2794 } else if (flc->flc_flags & FL_FLOCK) {
2796 } else if (flc->flc_flags & (FL_LEASE|FL_DELEG|FL_LAYOUT)) {
2797 struct file_lease *lease = file_lease(flc);
2801 if (flc->flc_flags & FL_DELEG)
2808 else if (flc->flc_file)
2826 if (flc->flc_flags & FL_POSIX) {