| /linux/net/ipv6/ |
| H A D | ip6_flowlabel.c | 60 #define for_each_fl_rcu(hash, fl) \ argument 61 for (fl = rcu_dereference(fl_ht[(hash)]); \ 62 fl != NULL; \ 63 fl = rcu_dereference(fl->next)) 64 #define for_each_fl_continue_rcu(fl) \ argument 65 for (fl = rcu_dereference(fl->next); \ 66 fl != NULL; \ 67 fl = rcu_dereference(fl->next)) 76 struct ip6_flowlabel *fl; in __fl_lookup() local 78 for_each_fl_rcu(FL_HASH(label), fl) { in __fl_lookup() [all …]
|
| /linux/tools/testing/selftests/filelock/ |
| H A D | ofdlocks.c | 11 static int lock_set(int fd, struct flock *fl) in lock_set() argument 15 fl->l_pid = 0; // needed for OFD locks in lock_set() 16 fl->l_whence = SEEK_SET; in lock_set() 17 ret = fcntl(fd, F_OFD_SETLK, fl); in lock_set() 23 static int lock_get(int fd, struct flock *fl) in lock_get() argument 27 fl->l_pid = 0; // needed for OFD locks in lock_get() 28 fl->l_whence = SEEK_SET; in lock_get() 29 ret = fcntl(fd, F_OFD_GETLK, fl); in lock_get() 38 struct flock fl, fl2; in main() local 48 fl.l_type = F_RDLCK; in main() [all …]
|
| /linux/include/trace/events/ |
| H A D | filelock.h | 64 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret), 66 TP_ARGS(inode, fl, ret), 69 __field(struct file_lock *, fl) 83 __entry->fl = fl ? fl : NULL; 86 __entry->blocker = fl ? fl->c.flc_blocker : NULL; 87 __entry->owner = fl ? fl->c.flc_owner : NULL; 88 __entry->pid = fl ? fl->c.flc_pid : 0; 89 __entry->flags = fl ? fl->c.flc_flags : 0; 90 __entry->type = fl ? fl->c.flc_type : 0; 91 __entry->fl_start = fl ? fl->fl_start : 0; [all …]
|
| /linux/fs/ |
| H A D | locks.c | 82 static bool lease_breaking(struct file_lease *fl) in lease_breaking() argument 84 return fl->c.flc_flags & (FL_UNLOCK_PENDING | FL_DOWNGRADE_PENDING); in lease_breaking() 87 static int target_leasetype(struct file_lease *fl) in target_leasetype() argument 89 if (fl->c.flc_flags & FL_UNLOCK_PENDING) in target_leasetype() 91 if (fl->c.flc_flags & FL_DOWNGRADE_PENDING) in target_leasetype() 93 return fl->c.flc_type; in target_leasetype() 275 struct file_lock *fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL); in locks_alloc_lock() local 277 if (fl) in locks_alloc_lock() 278 locks_init_lock_heads(&fl->c); in locks_alloc_lock() 280 return fl; in locks_alloc_lock() [all …]
|
| /linux/fs/afs/ |
| H A D | flock.c | 17 static void afs_fl_copy_lock(struct file_lock *new, struct file_lock *fl); 18 static void afs_fl_release_private(struct file_lock *fl); 451 static int afs_do_setlk(struct file *file, struct file_lock *fl) in afs_do_setlk() argument 466 fl->fl_start, fl->fl_end, fl->c.flc_type, mode); in afs_do_setlk() 468 fl->fl_ops = &afs_lock_ops; in afs_do_setlk() 469 INIT_LIST_HEAD(&fl->fl_u.afs.link); in afs_do_setlk() 470 fl->fl_u.afs.state = AFS_LOCK_PENDING; in afs_do_setlk() 472 partial = (fl->fl_start != 0 || fl->fl_end != OFFSET_MAX); in afs_do_setlk() 473 type = lock_is_read(fl) ? AFS_LOCK_READ : AFS_LOCK_WRITE; in afs_do_setlk() 481 trace_afs_flock_op(vnode, fl, afs_flock_op_set_lock); in afs_do_setlk() [all …]
|
| /linux/fs/lockd/ |
| H A D | clntproc.c | 34 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host); 129 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_setlockargs() argument 136 memcpy(&lock->fh, NFS_FH(file_inode(fl->c.flc_file)), in nlmclnt_setlockargs() 141 (unsigned int)fl->fl_u.nfs_fl.owner->pid, in nlmclnt_setlockargs() 143 lock->svid = fl->fl_u.nfs_fl.owner->pid; in nlmclnt_setlockargs() 144 lock->fl.fl_start = fl->fl_start; in nlmclnt_setlockargs() 145 lock->fl.fl_end = fl->fl_end; in nlmclnt_setlockargs() 146 lock->fl.c.flc_type = fl->c.flc_type; in nlmclnt_setlockargs() 151 WARN_ON_ONCE(req->a_args.lock.fl.fl_ops != NULL); in nlmclnt_release_lockargs() 162 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data) in nlmclnt_proc() argument [all …]
|
| H A D | svclock.c | 149 struct file_lock *fl; in nlmsvc_lookup_block() local 152 file, lock->fl.c.flc_pid, in nlmsvc_lookup_block() 153 (long long)lock->fl.fl_start, in nlmsvc_lookup_block() 154 (long long)lock->fl.fl_end, in nlmsvc_lookup_block() 155 lock->fl.c.flc_type); in nlmsvc_lookup_block() 158 fl = &block->b_call->a_args.lock.fl; in nlmsvc_lookup_block() 160 block->b_file, fl->c.flc_pid, in nlmsvc_lookup_block() 161 (long long)fl->fl_start, in nlmsvc_lookup_block() 162 (long long)fl->fl_end, fl->c.flc_type, in nlmsvc_lookup_block() 164 if (block->b_file == file && nlm_compare_locks(fl, &lock->fl)) { in nlmsvc_lookup_block() [all …]
|
| H A D | xdr4.c | 36 void nlm4svc_set_file_lock_range(struct file_lock *fl, u64 off, u64 len) in nlm4svc_set_file_lock_range() argument 40 fl->fl_start = off; in nlm4svc_set_file_lock_range() 42 fl->fl_end = OFFSET_MAX; in nlm4svc_set_file_lock_range() 44 fl->fl_end = end; in nlm4svc_set_file_lock_range() 76 struct file_lock *fl = &lock->fl; in svcxdr_decode_lock() local 91 locks_init_lock(fl); in svcxdr_decode_lock() 92 fl->c.flc_type = F_RDLCK; in svcxdr_decode_lock() 93 nlm4svc_set_file_lock_range(fl, lock->lock_start, lock->lock_len); in svcxdr_decode_lock() 100 const struct file_lock *fl = &lock->fl; in svcxdr_encode_holder() local 104 if (xdr_stream_encode_bool(xdr, fl->c.flc_type != F_RDLCK) < 0) in svcxdr_encode_holder() [all …]
|
| H A D | xdr.c | 74 struct file_lock *fl = &lock->fl; in svcxdr_decode_lock() local 90 locks_init_lock(fl); in svcxdr_decode_lock() 91 fl->c.flc_flags = FL_POSIX; in svcxdr_decode_lock() 92 fl->c.flc_type = F_RDLCK; in svcxdr_decode_lock() 94 fl->fl_start = s32_to_loff_t(start); in svcxdr_decode_lock() 96 fl->fl_end = OFFSET_MAX; in svcxdr_decode_lock() 98 fl->fl_end = s32_to_loff_t(end); in svcxdr_decode_lock() 106 const struct file_lock *fl = &lock->fl; in svcxdr_encode_holder() local 110 if (xdr_stream_encode_bool(xdr, fl->c.flc_type != F_RDLCK) < 0) in svcxdr_encode_holder() 116 start = loff_t_to_s32(fl->fl_start); in svcxdr_encode_holder() [all …]
|
| /linux/fs/ceph/ |
| H A D | locks.c | 45 static void ceph_fl_release_lock(struct file_lock *fl) in ceph_fl_release_lock() argument 47 struct inode *inode = fl->fl_u.ceph.inode; in ceph_fl_release_lock() 64 fl->fl_u.ceph.inode = NULL; in ceph_fl_release_lock() 77 int cmd, u8 wait, struct file_lock *fl) in ceph_lock_message() argument 93 fl->fl_ops = &ceph_fl_lock_ops; in ceph_lock_message() 94 fl->fl_ops->fl_copy_lock(fl, NULL); in ceph_lock_message() 108 if (LLONG_MAX == fl->fl_end) in ceph_lock_message() 111 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message() 113 owner = secure_addr(fl->c.flc_owner); in ceph_lock_message() 118 (u64) fl->c.flc_pid, in ceph_lock_message() [all …]
|
| H A D | util.c | 31 void ceph_file_layout_from_legacy(struct ceph_file_layout *fl, in ceph_file_layout_from_legacy() argument 34 fl->stripe_unit = le32_to_cpu(legacy->fl_stripe_unit); in ceph_file_layout_from_legacy() 35 fl->stripe_count = le32_to_cpu(legacy->fl_stripe_count); in ceph_file_layout_from_legacy() 36 fl->object_size = le32_to_cpu(legacy->fl_object_size); in ceph_file_layout_from_legacy() 37 fl->pool_id = le32_to_cpu(legacy->fl_pg_pool); in ceph_file_layout_from_legacy() 38 if (fl->pool_id == 0 && fl->stripe_unit == 0 && in ceph_file_layout_from_legacy() 39 fl->stripe_count == 0 && fl->object_size == 0) in ceph_file_layout_from_legacy() 40 fl->pool_id = -1; in ceph_file_layout_from_legacy() 43 void ceph_file_layout_to_legacy(struct ceph_file_layout *fl, in ceph_file_layout_to_legacy() argument 46 legacy->fl_stripe_unit = cpu_to_le32(fl->stripe_unit); in ceph_file_layout_to_legacy() [all …]
|
| /linux/fs/dlm/ |
| H A D | plock.c | 26 void *fl; member 29 int (*callback)(struct file_lock *fl, int result); 123 int cmd, struct file_lock *fl) in dlm_posix_lock() argument 141 op->info.pid = fl->c.flc_pid; in dlm_posix_lock() 142 op->info.ex = lock_is_write(fl); in dlm_posix_lock() 143 op->info.wait = !!(fl->c.flc_flags & FL_SLEEP); in dlm_posix_lock() 146 op->info.start = fl->fl_start; in dlm_posix_lock() 147 op->info.end = fl->fl_end; in dlm_posix_lock() 148 op->info.owner = (__u64)(long) fl->c.flc_owner; in dlm_posix_lock() 150 if (fl->fl_lmops && fl->fl_lmops->lm_grant) { in dlm_posix_lock() [all …]
|
| /linux/include/linux/ |
| H A D | thread_info.h | 157 #define set_syscall_work(fl) \ argument 158 set_bit(SYSCALL_WORK_BIT_##fl, ¤t_thread_info()->syscall_work) 159 #define test_syscall_work(fl) \ argument 160 test_bit(SYSCALL_WORK_BIT_##fl, ¤t_thread_info()->syscall_work) 161 #define clear_syscall_work(fl) \ argument 162 clear_bit(SYSCALL_WORK_BIT_##fl, ¤t_thread_info()->syscall_work) 164 #define set_task_syscall_work(t, fl) \ argument 165 set_bit(SYSCALL_WORK_BIT_##fl, &task_thread_info(t)->syscall_work) 166 #define test_task_syscall_work(t, fl) \ argument 167 test_bit(SYSCALL_WORK_BIT_##fl, &task_thread_info(t)->syscall_work) [all …]
|
| H A D | filelock.h | 163 static inline bool lock_is_unlock(struct file_lock *fl) in lock_is_unlock() argument 165 return fl->c.flc_type == F_UNLCK; in lock_is_unlock() 168 static inline bool lock_is_read(struct file_lock *fl) in lock_is_read() argument 170 return fl->c.flc_type == F_RDLCK; in lock_is_read() 173 static inline bool lock_is_write(struct file_lock *fl) in lock_is_write() argument 175 return fl->c.flc_type == F_WRLCK; in lock_is_write() 183 static inline void locks_wake_up(struct file_lock *fl) in locks_wake_up() argument 185 locks_wake_up_waiter(&fl->c); in locks_wake_up() 195 void locks_free_lock(struct file_lock *fl); 208 int vfs_cancel_lock(struct file *filp, struct file_lock *fl); [all …]
|
| /linux/drivers/misc/ |
| H A D | fastrpc.c | 193 struct fastrpc_user *fl; member 215 struct fastrpc_user *fl; member 244 struct fastrpc_user *fl; member 317 int vmid = map->fl->cctx->vmperms[0].vmid; in fastrpc_free_map() 326 dev_err(map->fl->sctx->dev, "Failed to assign memory phys 0x%llx size 0x%llx err %d\n", in fastrpc_free_map() 337 if (map->fl) { in fastrpc_free_map() 338 spin_lock(&map->fl->lock); in fastrpc_free_map() 340 spin_unlock(&map->fl->lock); in fastrpc_free_map() 341 map->fl = NULL; in fastrpc_free_map() 362 static int fastrpc_map_lookup(struct fastrpc_user *fl, int fd, in fastrpc_map_lookup() argument [all …]
|
| /linux/fs/9p/ |
| H A D | vfs_file.c | 104 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock() argument 108 p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); in v9fs_file_lock() 110 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->c.flc_type != F_UNLCK) { in v9fs_file_lock() 118 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock() argument 129 BUG_ON((fl->c.flc_flags & FL_POSIX) != FL_POSIX); in v9fs_file_do_lock() 131 res = locks_lock_file_wait(filp, fl); in v9fs_file_do_lock() 138 switch (fl->c.flc_type) { in v9fs_file_do_lock() 149 flock.start = fl->fl_start; in v9fs_file_do_lock() 150 if (fl->fl_end == OFFSET_MAX) in v9fs_file_do_lock() 153 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock() [all …]
|
| /linux/drivers/gpu/drm/msm/disp/dpu1/ |
| H A D | dpu_hw_catalog.c | 604 {.fl = 4, .lut = 0x1b}, 605 {.fl = 5, .lut = 0x5b}, 606 {.fl = 6, .lut = 0x15b}, 607 {.fl = 7, .lut = 0x55b}, 608 {.fl = 8, .lut = 0x155b}, 609 {.fl = 9, .lut = 0x555b}, 610 {.fl = 10, .lut = 0x1555b}, 611 {.fl = 11, .lut = 0x5555b}, 612 {.fl = 12, .lut = 0x15555b}, 613 {.fl = 0, .lut = 0x55555b} [all …]
|
| /linux/fs/nfs/filelayout/ |
| H A D | filelayout.c | 539 struct nfs4_filelayout_segment *fl, in filelayout_check_deviceid() argument 547 if (fl->dsaddr != NULL) in filelayout_check_deviceid() 551 d = nfs4_find_get_deviceid(NFS_SERVER(lo->plh_inode), &fl->deviceid, in filelayout_check_deviceid() 561 if (fl->first_stripe_index >= dsaddr->stripe_count) { in filelayout_check_deviceid() 563 __func__, fl->first_stripe_index); in filelayout_check_deviceid() 567 if ((fl->stripe_type == STRIPE_SPARSE && in filelayout_check_deviceid() 568 fl->num_fh > 1 && fl->num_fh != dsaddr->ds_num) || in filelayout_check_deviceid() 569 (fl->stripe_type == STRIPE_DENSE && in filelayout_check_deviceid() 570 fl->num_fh != dsaddr->stripe_count)) { in filelayout_check_deviceid() 572 __func__, fl->num_fh); in filelayout_check_deviceid() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb4vf/ |
| H A D | sge.c | 247 static inline unsigned int fl_cap(const struct sge_fl *fl) in fl_cap() argument 249 return fl->size - FL_PER_EQ_UNIT; in fl_cap() 262 const struct sge_fl *fl) in fl_starving() argument 266 return fl->avail - fl->pend_cred <= s->fl_starve_thres; in fl_starving() 473 static void free_rx_bufs(struct adapter *adapter, struct sge_fl *fl, int n) in free_rx_bufs() argument 476 struct rx_sw_desc *sdesc = &fl->sdesc[fl->cidx]; in free_rx_bufs() 484 if (++fl->cidx == fl->size) in free_rx_bufs() 485 fl->cidx = 0; in free_rx_bufs() 486 fl->avail--; in free_rx_bufs() 503 static void unmap_rx_buf(struct adapter *adapter, struct sge_fl *fl) in unmap_rx_buf() argument [all …]
|
| /linux/fs/ocfs2/ |
| H A D | locks.c | 24 int cmd, struct file_lock *fl) in ocfs2_do_flock() argument 30 if (lock_is_write(fl)) in ocfs2_do_flock() 72 ret = locks_lock_file_wait(file, fl); in ocfs2_do_flock() 82 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument 89 ret = locks_lock_file_wait(file, fl); in ocfs2_do_funlock() 98 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_flock() argument 103 if (!(fl->c.flc_flags & FL_FLOCK)) in ocfs2_flock() 108 return locks_lock_file_wait(file, fl); in ocfs2_flock() 110 if (lock_is_unlock(fl)) in ocfs2_flock() 111 return ocfs2_do_funlock(file, cmd, fl); in ocfs2_flock() [all …]
|
| /linux/drivers/mtd/parsers/ |
| H A D | redboot.c | 79 struct fis_list *fl = NULL, *tmp_fl; in parse_redboot_partitions() local 221 prev = &fl; in parse_redboot_partitions() 230 if (fl->img->flash_base) { in parse_redboot_partitions() 235 for (tmp_fl = fl; tmp_fl->next; tmp_fl = tmp_fl->next) { in parse_redboot_partitions() 259 if (fl->img->flash_base) { in parse_redboot_partitions() 261 parts[0].size = fl->img->flash_base; in parse_redboot_partitions() 267 parts[i].size = fl->img->size; in parse_redboot_partitions() 268 parts[i].offset = fl->img->flash_base; in parse_redboot_partitions() 271 strcpy(names, fl->img->name); in parse_redboot_partitions() 282 …if (fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_ba… in parse_redboot_partitions() [all …]
|
| /linux/fs/nfsd/ |
| H A D | flexfilelayout.c | 31 struct pnfs_ff_layout *fl; in nfsd4_ff_proc_layoutget() local 39 fl = kzalloc(sizeof(*fl), GFP_KERNEL); in nfsd4_ff_proc_layoutget() 40 if (!fl) in nfsd4_ff_proc_layoutget() 42 args->lg_content = fl; in nfsd4_ff_proc_layoutget() 49 fl->flags = FF_FLAGS_NO_LAYOUTCOMMIT | FF_FLAGS_NO_IO_THRU_MDS | in nfsd4_ff_proc_layoutget() 55 fl->uid = make_kuid(&init_user_ns, u); in nfsd4_ff_proc_layoutget() 57 fl->uid = inode->i_uid; in nfsd4_ff_proc_layoutget() 58 fl->gid = inode->i_gid; in nfsd4_ff_proc_layoutget() 60 error = nfsd4_set_deviceid(&fl->deviceid, fhp, device_generation); in nfsd4_ff_proc_layoutget() 64 fl->fh.size = fhp->fh_handle.fh_size; in nfsd4_ff_proc_layoutget() [all …]
|
| /linux/drivers/net/ovpn/ |
| H A D | udp.c | 150 struct flowi4 fl = { in ovpn_udp4_output() local 161 rt = dst_cache_get_ip4(cache, &fl.saddr); in ovpn_udp4_output() 165 if (unlikely(!inet_confirm_addr(sock_net(sk), NULL, 0, fl.saddr, in ovpn_udp4_output() 171 fl.saddr = 0; in ovpn_udp4_output() 178 rt = ip_route_output_flow(sock_net(sk), &fl, sk); in ovpn_udp4_output() 180 fl.saddr = 0; in ovpn_udp4_output() 186 rt = ip_route_output_flow(sock_net(sk), &fl, sk); in ovpn_udp4_output() 197 dst_cache_set_ip4(cache, &rt->dst, fl.saddr); in ovpn_udp4_output() 200 udp_tunnel_xmit_skb(rt, sk, skb, fl.saddr, fl.daddr, 0, in ovpn_udp4_output() 201 ip4_dst_hoplimit(&rt->dst), 0, fl.fl4_sport, in ovpn_udp4_output() [all …]
|
| /linux/net/l3mdev/ |
| H A D | l3mdev.c | 247 int l3mdev_fib_rule_match(struct net *net, struct flowi *fl, in l3mdev_fib_rule_match() argument 254 if (!fl->flowi_l3mdev) in l3mdev_fib_rule_match() 259 dev = dev_get_by_index_rcu(net, fl->flowi_l3mdev); in l3mdev_fib_rule_match() 271 void l3mdev_update_flow(struct net *net, struct flowi *fl) in l3mdev_update_flow() argument 277 if (fl->flowi_oif) { in l3mdev_update_flow() 278 dev = dev_get_by_index_rcu(net, fl->flowi_oif); in l3mdev_update_flow() 280 if (!fl->flowi_l3mdev) { in l3mdev_update_flow() 281 fl->flowi_l3mdev = l3mdev_master_ifindex_rcu(dev); in l3mdev_update_flow() 282 fl->flowi_flags |= FLOWI_FLAG_L3MDEV_OIF; in l3mdev_update_flow() 289 fl->flowi_oif = 0; in l3mdev_update_flow() [all …]
|
| /linux/drivers/net/wireguard/ |
| H A D | socket.c | 23 struct flowi4 fl = { in send4() local 46 fl.fl4_sport = inet_sk(sock)->inet_sport; in send4() 49 rt = dst_cache_get_ip4(cache, &fl.saddr); in send4() 52 security_sk_classify_flow(sock, flowi4_to_flowi_common(&fl)); in send4() 54 fl.saddr, RT_SCOPE_HOST))) { in send4() 57 fl.saddr = 0; in send4() 61 rt = ip_route_output_flow(sock_net(sock), &fl, sock); in send4() 67 fl.saddr = 0; in send4() 72 rt = ip_route_output_flow(sock_net(sock), &fl, sock); in send4() 81 dst_cache_set_ip4(cache, &rt->dst, fl.saddr); in send4() [all …]
|