Home
last modified time | relevance | path

Searched refs:fl (Results 1 – 25 of 116) sorted by relevance

12345

/linux-2.6.39/fs/
Dlocks.c132 #define IS_POSIX(fl) (fl->fl_flags & FL_POSIX) argument
133 #define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK) argument
134 #define IS_LEASE(fl) (fl->fl_flags & FL_LEASE) argument
170 void locks_release_private(struct file_lock *fl) in locks_release_private() argument
172 if (fl->fl_ops) { in locks_release_private()
173 if (fl->fl_ops->fl_release_private) in locks_release_private()
174 fl->fl_ops->fl_release_private(fl); in locks_release_private()
175 fl->fl_ops = NULL; in locks_release_private()
177 if (fl->fl_lmops) { in locks_release_private()
178 if (fl->fl_lmops->fl_release_private) in locks_release_private()
[all …]
/linux-2.6.39/net/ipv6/
Dip6_flowlabel.c68 struct ip6_flowlabel *fl; in __fl_lookup() local
70 for (fl=fl_ht[FL_HASH(label)]; fl; fl = fl->next) { in __fl_lookup()
71 if (fl->label == label && net_eq(fl->fl_net, net)) in __fl_lookup()
72 return fl; in __fl_lookup()
79 struct ip6_flowlabel *fl; in fl_lookup() local
82 fl = __fl_lookup(net, label); in fl_lookup()
83 if (fl) in fl_lookup()
84 atomic_inc(&fl->users); in fl_lookup()
86 return fl; in fl_lookup()
90 static void fl_free(struct ip6_flowlabel *fl) in fl_free() argument
[all …]
/linux-2.6.39/fs/afs/
Dflock.c17 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);
83 static void afs_grant_locks(struct afs_vnode *vnode, struct file_lock *fl) in afs_grant_locks() argument
87 list_move_tail(&fl->fl_u.afs.link, &vnode->granted_locks); in afs_grant_locks()
88 if (fl->fl_type == F_RDLCK) { in afs_grant_locks()
110 struct file_lock *fl; in afs_lock_work() local
144 fl = list_entry(vnode->granted_locks.next, in afs_lock_work()
146 key = key_get(fl->fl_file->private_data); in afs_lock_work()
178 fl = list_entry(vnode->pending_locks.next, in afs_lock_work()
180 key = key_get(fl->fl_file->private_data); in afs_lock_work()
[all …]
/linux-2.6.39/fs/lockd/
Dclntproc.c30 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host);
124 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_setlockargs() argument
130 memcpy(&lock->fh, NFS_FH(fl->fl_file->f_path.dentry->d_inode), sizeof(struct nfs_fh)); in nlmclnt_setlockargs()
134 (unsigned int)fl->fl_u.nfs_fl.owner->pid, in nlmclnt_setlockargs()
136 lock->svid = fl->fl_u.nfs_fl.owner->pid; in nlmclnt_setlockargs()
137 lock->fl.fl_start = fl->fl_start; in nlmclnt_setlockargs()
138 lock->fl.fl_end = fl->fl_end; in nlmclnt_setlockargs()
139 lock->fl.fl_type = fl->fl_type; in nlmclnt_setlockargs()
144 BUG_ON(req->a_args.lock.fl.fl_ops != NULL); in nlmclnt_release_lockargs()
154 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) in nlmclnt_proc() argument
[all …]
Dsvclock.c119 struct file_lock *fl; in nlmsvc_lookup_block() local
122 file, lock->fl.fl_pid, in nlmsvc_lookup_block()
123 (long long)lock->fl.fl_start, in nlmsvc_lookup_block()
124 (long long)lock->fl.fl_end, lock->fl.fl_type); in nlmsvc_lookup_block()
126 fl = &block->b_call->a_args.lock.fl; in nlmsvc_lookup_block()
128 block->b_file, fl->fl_pid, in nlmsvc_lookup_block()
129 (long long)fl->fl_start, in nlmsvc_lookup_block()
130 (long long)fl->fl_end, fl->fl_type, in nlmsvc_lookup_block()
132 if (block->b_file == file && nlm_compare_locks(fl, &lock->fl)) { in nlmsvc_lookup_block()
211 call->a_args.lock.fl.fl_flags |= FL_SLEEP; in nlmsvc_create_block()
[all …]
Dxdr4.c108 struct file_lock *fl = &lock->fl; in nlm4_decode_lock() local
119 locks_init_lock(fl); in nlm4_decode_lock()
120 fl->fl_owner = current->files; in nlm4_decode_lock()
121 fl->fl_pid = (pid_t)lock->svid; in nlm4_decode_lock()
122 fl->fl_flags = FL_POSIX; in nlm4_decode_lock()
123 fl->fl_type = F_RDLCK; /* as good as anything else */ in nlm4_decode_lock()
128 fl->fl_start = s64_to_loff_t(start); in nlm4_decode_lock()
131 fl->fl_end = OFFSET_MAX; in nlm4_decode_lock()
133 fl->fl_end = s64_to_loff_t(end); in nlm4_decode_lock()
151 struct file_lock *fl = &resp->lock.fl; in nlm4_encode_testres() local
[all …]
Dxdr.c122 struct file_lock *fl = &lock->fl; in nlm_decode_lock() local
133 locks_init_lock(fl); in nlm_decode_lock()
134 fl->fl_owner = current->files; in nlm_decode_lock()
135 fl->fl_pid = (pid_t)lock->svid; in nlm_decode_lock()
136 fl->fl_flags = FL_POSIX; in nlm_decode_lock()
137 fl->fl_type = F_RDLCK; /* as good as anything else */ in nlm_decode_lock()
142 fl->fl_start = s32_to_loff_t(start); in nlm_decode_lock()
145 fl->fl_end = OFFSET_MAX; in nlm_decode_lock()
147 fl->fl_end = s32_to_loff_t(end); in nlm_decode_lock()
164 struct file_lock *fl = &resp->lock.fl; in nlm_encode_testres() local
[all …]
Dclnt4xdr.c65 const struct file_lock *fl = &lock->fl; in nlm4_compute_offsets() local
67 BUG_ON(fl->fl_start > NLM4_OFFSET_MAX); in nlm4_compute_offsets()
68 BUG_ON(fl->fl_end > NLM4_OFFSET_MAX && in nlm4_compute_offsets()
69 fl->fl_end != OFFSET_MAX); in nlm4_compute_offsets()
71 *l_offset = loff_t_to_s64(fl->fl_start); in nlm4_compute_offsets()
72 if (fl->fl_end == OFFSET_MAX) in nlm4_compute_offsets()
75 *l_len = loff_t_to_s64(fl->fl_end - fl->fl_start + 1); in nlm4_compute_offsets()
273 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm4_holder()
286 struct file_lock *fl = &lock->fl; in decode_nlm4_holder() local
294 locks_init_lock(fl); in decode_nlm4_holder()
[all …]
Dclntlock.c90 struct nlm_wait *nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block() argument
97 block->b_lock = fl; in nlmclnt_prepare_block()
153 const struct file_lock *fl = &lock->fl; in nlmclnt_grant() local
166 if (fl_blocked->fl_start != fl->fl_start) in nlmclnt_grant()
168 if (fl_blocked->fl_end != fl->fl_end) in nlmclnt_grant()
220 struct file_lock *fl, *next; in reclaimer() local
241 list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) { in reclaimer()
242 list_del_init(&fl->fl_u.nfs_fl.list); in reclaimer()
252 if (nlmclnt_reclaim(host, fl) != 0) in reclaimer()
254 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); in reclaimer()
Dsvcsubs.c168 struct file_lock *fl; in nlm_traverse_locks() local
174 for (fl = inode->i_flock; fl; fl = fl->fl_next) { in nlm_traverse_locks()
175 if (fl->fl_lmops != &nlmsvc_lock_operations) in nlm_traverse_locks()
181 lockhost = (struct nlm_host *) fl->fl_owner; in nlm_traverse_locks()
183 struct file_lock lock = *fl; in nlm_traverse_locks()
227 struct file_lock *fl; in nlm_file_inuse() local
233 for (fl = inode->i_flock; fl; fl = fl->fl_next) { in nlm_file_inuse()
234 if (fl->fl_lmops == &nlmsvc_lock_operations) { in nlm_file_inuse()
Dclntxdr.c61 const struct file_lock *fl = &lock->fl; in nlm_compute_offsets() local
63 BUG_ON(fl->fl_start > NLM_OFFSET_MAX); in nlm_compute_offsets()
64 BUG_ON(fl->fl_end > NLM_OFFSET_MAX && in nlm_compute_offsets()
65 fl->fl_end != OFFSET_MAX); in nlm_compute_offsets()
67 *l_offset = loff_t_to_s32(fl->fl_start); in nlm_compute_offsets()
68 if (fl->fl_end == OFFSET_MAX) in nlm_compute_offsets()
71 *l_len = loff_t_to_s32(fl->fl_end - fl->fl_start + 1); in nlm_compute_offsets()
268 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm_holder()
281 struct file_lock *fl = &lock->fl; in decode_nlm_holder() local
288 locks_init_lock(fl); in decode_nlm_holder()
[all …]
/linux-2.6.39/fs/nfs/
Dnfs4filelayout.c419 struct nfs4_filelayout_segment *fl, in filelayout_check_layout() argument
430 if (fl->pattern_offset > lgr->range.offset) { in filelayout_check_layout()
432 __func__, fl->pattern_offset); in filelayout_check_layout()
436 if (!fl->stripe_unit || fl->stripe_unit % PAGE_SIZE) { in filelayout_check_layout()
438 __func__, fl->stripe_unit); in filelayout_check_layout()
449 fl->dsaddr = dsaddr; in filelayout_check_layout()
451 if (fl->first_stripe_index < 0 || in filelayout_check_layout()
452 fl->first_stripe_index >= dsaddr->stripe_count) { in filelayout_check_layout()
454 __func__, fl->first_stripe_index); in filelayout_check_layout()
458 if ((fl->stripe_type == STRIPE_SPARSE && in filelayout_check_layout()
[all …]
Dfile.c60 static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl);
61 static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl);
62 static int nfs_setlease(struct file *file, long arg, struct file_lock **fl);
691 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_getlk() argument
695 unsigned int saved_type = fl->fl_type; in do_getlk()
698 posix_test_lock(filp, fl); in do_getlk()
699 if (fl->fl_type != F_UNLCK) { in do_getlk()
703 fl->fl_type = saved_type; in do_getlk()
711 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_getlk()
715 fl->fl_type = F_UNLCK; in do_getlk()
[all …]
/linux-2.6.39/fs/ceph/
Dlocks.c14 int cmd, u8 wait, struct file_lock *fl) in ceph_lock_message() argument
29 if (LLONG_MAX == fl->fl_end) in ceph_lock_message()
32 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message()
36 (int)operation, (u64)fl->fl_pid, fl->fl_start, in ceph_lock_message()
37 length, wait, fl->fl_type); in ceph_lock_message()
42 req->r_args.filelock_change.pid = cpu_to_le64((u64)fl->fl_pid); in ceph_lock_message()
46 cpu_to_le64((u64)(unsigned long)fl->fl_nspid); in ceph_lock_message()
47 req->r_args.filelock_change.start = cpu_to_le64(fl->fl_start); in ceph_lock_message()
54 fl->fl_pid = le64_to_cpu(req->r_reply_info.filelock_reply->pid); in ceph_lock_message()
56 fl->fl_type = F_RDLCK; in ceph_lock_message()
[all …]
/linux-2.6.39/fs/dlm/
Dplock.c34 void *fl; member
75 int cmd, struct file_lock *fl) in dlm_posix_lock() argument
94 op->info.pid = fl->fl_pid; in dlm_posix_lock()
95 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_lock()
99 op->info.start = fl->fl_start; in dlm_posix_lock()
100 op->info.end = fl->fl_end; in dlm_posix_lock()
101 if (fl->fl_lmops && fl->fl_lmops->fl_grant) { in dlm_posix_lock()
104 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_lock()
105 xop->callback = fl->fl_lmops->fl_grant; in dlm_posix_lock()
107 locks_copy_lock(&xop->flc, fl); in dlm_posix_lock()
[all …]
/linux-2.6.39/fs/ocfs2/
Dlocks.c39 int cmd, struct file_lock *fl) in ocfs2_do_flock() argument
45 if (fl->fl_type == F_WRLCK) in ocfs2_do_flock()
84 ret = flock_lock_file_wait(file, fl); in ocfs2_do_flock()
92 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument
99 ret = flock_lock_file_wait(file, fl); in ocfs2_do_funlock()
108 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_flock() argument
113 if (!(fl->fl_flags & FL_FLOCK)) in ocfs2_flock()
120 return flock_lock_file_wait(file, fl); in ocfs2_flock()
122 if (fl->fl_type == F_UNLCK) in ocfs2_flock()
123 return ocfs2_do_funlock(file, cmd, fl); in ocfs2_flock()
[all …]
/linux-2.6.39/fs/9p/
Dvfs_file.c133 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock() argument
138 P9_DPRINTK(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); in v9fs_file_lock()
141 if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) in v9fs_file_lock()
144 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { in v9fs_file_lock()
152 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock() argument
163 if ((fl->fl_flags & FL_POSIX) != FL_POSIX) in v9fs_file_do_lock()
166 res = posix_lock_file_wait(filp, fl); in v9fs_file_do_lock()
172 flock.type = fl->fl_type; in v9fs_file_do_lock()
173 flock.start = fl->fl_start; in v9fs_file_do_lock()
174 if (fl->fl_end == OFFSET_MAX) in v9fs_file_do_lock()
[all …]
/linux-2.6.39/drivers/net/cxgb4vf/
Dsge.c259 static inline unsigned int fl_cap(const struct sge_fl *fl) in fl_cap() argument
261 return fl->size - FL_PER_EQ_UNIT; in fl_cap()
272 static inline bool fl_starving(const struct sge_fl *fl) in fl_starving() argument
274 return fl->avail - fl->pend_cred <= FL_STARVE_THRES; in fl_starving()
478 static void free_rx_bufs(struct adapter *adapter, struct sge_fl *fl, int n) in free_rx_bufs() argument
481 struct rx_sw_desc *sdesc = &fl->sdesc[fl->cidx]; in free_rx_bufs()
488 if (++fl->cidx == fl->size) in free_rx_bufs()
489 fl->cidx = 0; in free_rx_bufs()
490 fl->avail--; in free_rx_bufs()
507 static void unmap_rx_buf(struct adapter *adapter, struct sge_fl *fl) in unmap_rx_buf() argument
[all …]
/linux-2.6.39/drivers/mtd/
Dredboot.c65 struct fis_list *fl = NULL, *tmp_fl; in parse_redboot_partitions() local
209 prev = &fl; in parse_redboot_partitions()
218 if (fl->img->flash_base) { in parse_redboot_partitions()
223 for (tmp_fl = fl; tmp_fl->next; tmp_fl = tmp_fl->next) { in parse_redboot_partitions()
248 if (fl->img->flash_base) { in parse_redboot_partitions()
250 parts[0].size = fl->img->flash_base; in parse_redboot_partitions()
256 parts[i].size = fl->img->size; in parse_redboot_partitions()
257 parts[i].offset = fl->img->flash_base; in parse_redboot_partitions()
260 strcpy(names, fl->img->name); in parse_redboot_partitions()
271 …if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_bas… in parse_redboot_partitions()
[all …]
/linux-2.6.39/scripts/kconfig/
Dkxgettext.c138 struct file_line *fl = file_line__new(file, lineno); in message__add_file_line() local
140 if (fl == NULL) in message__add_file_line()
143 fl->next = self->files; in message__add_file_line()
144 self->files = fl; in message__add_file_line()
192 struct file_line *fl = self->files; in message__print_file_lineno() local
198 printf("#: %s:%d", fl->file, fl->lineno); in message__print_file_lineno()
199 fl = fl->next; in message__print_file_lineno()
201 while (fl != NULL) { in message__print_file_lineno()
202 printf(", %s:%d", fl->file, fl->lineno); in message__print_file_lineno()
203 fl = fl->next; in message__print_file_lineno()
/linux-2.6.39/drivers/net/cxgb3/
Dsge.c168 return container_of(q, struct sge_qset, fl[qidx]); in fl_to_qset()
557 static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl) in __refill_fl() argument
559 refill_fl(adap, fl, min(MAX_RX_REFILL, fl->size - fl->credits), in __refill_fl()
652 memset(q->fl, 0, sizeof(struct sge_fl) * SGE_RXQ_PER_SET); in t3_reset_qset()
677 if (q->fl[i].desc) { in t3_free_qset()
679 t3_sge_disable_fl(adapter, q->fl[i].cntxt_id); in t3_free_qset()
681 free_rx_bufs(pdev, &q->fl[i]); in t3_free_qset()
682 kfree(q->fl[i].sdesc); in t3_free_qset()
684 q->fl[i].size * in t3_free_qset()
685 sizeof(struct rx_desc), q->fl[i].desc, in t3_free_qset()
[all …]
/linux-2.6.39/drivers/net/cxgb4/
Dsge.c193 static inline unsigned int fl_cap(const struct sge_fl *fl) in fl_cap() argument
195 return fl->size - 8; /* 1 descriptor = 8 buffers */ in fl_cap()
198 static inline bool fl_starving(const struct sge_fl *fl) in fl_starving() argument
200 return fl->avail - fl->pend_cred <= FL_STARVE_THRES; in fl_starving()
567 static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl) in __refill_fl() argument
569 refill_fl(adap, fl, min(MAX_RX_REFILL, fl_cap(fl) - fl->avail), in __refill_fl()
1709 free_rx_bufs(q->adap, &rxq->fl, 1); in process_responses()
1718 rsd = &rxq->fl.sdesc[rxq->fl.cidx]; in process_responses()
1726 unmap_rx_buf(q->adap, &rxq->fl); in process_responses()
1746 restore_rx_bufs(&si, &rxq->fl, frags); in process_responses()
[all …]
/linux-2.6.39/net/xfrm/
Dxfrm_policy.c60 __xfrm4_selector_match(const struct xfrm_selector *sel, const struct flowi *fl) in __xfrm4_selector_match() argument
62 const struct flowi4 *fl4 = &fl->u.ip4; in __xfrm4_selector_match()
66 !((xfrm_flowi_dport(fl, &fl4->uli) ^ sel->dport) & sel->dport_mask) && in __xfrm4_selector_match()
67 !((xfrm_flowi_sport(fl, &fl4->uli) ^ sel->sport) & sel->sport_mask) && in __xfrm4_selector_match()
73 __xfrm6_selector_match(const struct xfrm_selector *sel, const struct flowi *fl) in __xfrm6_selector_match() argument
75 const struct flowi6 *fl6 = &fl->u.ip6; in __xfrm6_selector_match()
79 !((xfrm_flowi_dport(fl, &fl6->uli) ^ sel->dport) & sel->dport_mask) && in __xfrm6_selector_match()
80 !((xfrm_flowi_sport(fl, &fl6->uli) ^ sel->sport) & sel->sport_mask) && in __xfrm6_selector_match()
85 int xfrm_selector_match(const struct xfrm_selector *sel, const struct flowi *fl, in xfrm_selector_match() argument
90 return __xfrm4_selector_match(sel, fl); in xfrm_selector_match()
[all …]
/linux-2.6.39/arch/mips/kernel/
Drtlx.c308 size_t lx_write, fl = 0L; in rtlx_read() local
327 fl = min(count, (size_t)lx->buffer_size - lx->lx_read); in rtlx_read()
329 failed = copy_to_user(buff, lx->lx_buffer + lx->lx_read, fl); in rtlx_read()
334 if (count - fl) in rtlx_read()
335 failed = copy_to_user(buff + fl, lx->lx_buffer, count - fl); in rtlx_read()
353 size_t fl; in rtlx_write() local
369 fl = min(count, (size_t) rt->buffer_size - rt->rt_write); in rtlx_write()
371 failed = copy_from_user(rt->rt_buffer + rt->rt_write, buffer, fl); in rtlx_write()
376 if (count - fl) { in rtlx_write()
377 failed = copy_from_user(rt->rt_buffer, buffer + fl, count - fl); in rtlx_write()
/linux-2.6.39/drivers/net/chelsio/
Dsge.c1015 static void recycle_fl_buf(struct freelQ *fl, int idx) in recycle_fl_buf() argument
1017 struct freelQ_e *from = &fl->entries[idx]; in recycle_fl_buf()
1018 struct freelQ_e *to = &fl->entries[fl->pidx]; in recycle_fl_buf()
1020 fl->centries[fl->pidx] = fl->centries[idx]; in recycle_fl_buf()
1023 to->len_gen = G_CMD_LEN(from->len_gen) | V_CMD_GEN1(fl->genbit); in recycle_fl_buf()
1025 to->gen2 = V_CMD_GEN2(fl->genbit); in recycle_fl_buf()
1026 fl->credits++; in recycle_fl_buf()
1028 if (++fl->pidx == fl->size) { in recycle_fl_buf()
1029 fl->pidx = 0; in recycle_fl_buf()
1030 fl->genbit ^= 1; in recycle_fl_buf()
[all …]

12345