Home
last modified time | relevance | path

Searched refs:file_lock (Results 1 – 25 of 75) sorted by relevance

123

/Linux-v5.4/fs/
Dlocks.c183 static bool lease_breaking(struct file_lock *fl) in lease_breaking()
188 static int target_leasetype(struct file_lock *fl) in target_leasetype()
283 struct file_lock *fl; in locks_dump_ctx_list()
311 struct file_lock *fl; in locks_check_ctx_file_list()
334 static void locks_init_lock_heads(struct file_lock *fl) in locks_init_lock_heads()
344 struct file_lock *locks_alloc_lock(void) in locks_alloc_lock()
346 struct file_lock *fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL); in locks_alloc_lock()
355 void locks_release_private(struct file_lock *fl) in locks_release_private()
380 void locks_free_lock(struct file_lock *fl) in locks_free_lock()
390 struct file_lock *fl; in locks_dispose_list()
[all …]
Dfile.c149 __releases(files->file_lock) in expand_fdtable()
150 __acquires(files->file_lock) in expand_fdtable()
154 spin_unlock(&files->file_lock); in expand_fdtable()
163 spin_lock(&files->file_lock); in expand_fdtable()
194 __releases(files->file_lock) in expand_files()
195 __acquires(files->file_lock) in expand_files()
212 spin_unlock(&files->file_lock); in expand_files()
215 spin_lock(&files->file_lock); in expand_files()
286 spin_lock_init(&newf->file_lock); in dup_fd()
297 spin_lock(&oldf->file_lock); in dup_fd()
[all …]
/Linux-v5.4/include/trace/events/
Dfilelock.h63 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
68 __field(struct file_lock *, fl)
71 __field(struct file_lock *, fl_blocker)
104 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
108 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
112 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
116 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
120 TP_PROTO(struct inode *inode, struct file_lock *fl),
125 __field(struct file_lock *, fl)
128 __field(struct file_lock *, fl_blocker)
[all …]
/Linux-v5.4/fs/ocfs2/
Dlocks.c25 int cmd, struct file_lock *fl) in ocfs2_do_flock()
41 struct file_lock request; in ocfs2_do_flock()
83 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock()
99 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_flock()
119 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_lock()
Dlocks.h15 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl);
16 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
Dstackglue.h25 struct file_lock;
212 struct file_lock *fl);
284 struct file *file, int cmd, struct file_lock *fl);
/Linux-v5.4/include/linux/
Ddlm_plock.h11 int cmd, struct file_lock *fl);
13 struct file_lock *fl);
15 struct file_lock *fl);
Dfs.h1027 struct file_lock;
1030 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
1031 void (*fl_release_private)(struct file_lock *);
1037 void (*lm_notify)(struct file_lock *); /* unblock callback */
1038 int (*lm_grant)(struct file_lock *, int);
1039 bool (*lm_break)(struct file_lock *);
1040 int (*lm_change)(struct file_lock *, int, struct list_head *);
1041 void (*lm_setup)(struct file_lock *, void **);
1079 struct file_lock { struct
1080 struct file_lock *fl_blocker; /* The lock, that is blocking us */ argument
[all …]
Dfdtable.h61 spinlock_t file_lock ____cacheline_aligned_in_smp;
74 rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock))
96 !lockdep_is_held(&files->file_lock), in fcheck_files()
/Linux-v5.4/fs/lockd/
Dclntproc.c27 static int nlmclnt_test(struct nlm_rqst *, struct file_lock *);
28 static int nlmclnt_lock(struct nlm_rqst *, struct file_lock *);
29 static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *);
31 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host);
32 static int nlmclnt_cancel(struct nlm_host *, int , struct file_lock *);
126 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_setlockargs()
158 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data) in nlmclnt_proc()
428 nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_test()
457 static void nlmclnt_locks_copy_lock(struct file_lock *new, struct file_lock *fl) in nlmclnt_locks_copy_lock()
466 static void nlmclnt_locks_release_private(struct file_lock *fl) in nlmclnt_locks_release_private()
[all …]
Dclntlock.c39 struct file_lock * b_lock; /* local file lock */
100 struct nlm_wait *nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block()
166 const struct file_lock *fl = &lock->fl; in nlmclnt_grant()
177 struct file_lock *fl_blocked = block->b_lock; in nlmclnt_grant()
234 struct file_lock *fl, *next; in reclaimer()
Dsvclock.c148 struct file_lock *fl; in nlmsvc_lookup_block()
398 static void nlmsvc_locks_copy_lock(struct file_lock *new, struct file_lock *fl) in nlmsvc_locks_copy_lock()
404 static void nlmsvc_locks_release_private(struct file_lock *fl) in nlmsvc_locks_release_private()
414 void nlmsvc_locks_init_private(struct file_lock *fl, struct nlm_host *host, in nlmsvc_locks_init_private()
734 static int nlmsvc_grant_deferred(struct file_lock *fl, int result) in nlmsvc_grant_deferred()
773 nlmsvc_notify_blocked(struct file_lock *fl) in nlmsvc_notify_blocked()
Dsvcsubs.c167 struct file_lock *fl; in nlm_traverse_locks()
185 struct file_lock lock = *fl; in nlm_traverse_locks()
229 struct file_lock *fl; in nlm_file_inuse()
/Linux-v5.4/Documentation/filesystems/
Dfiles.txt8 with a lock (files->file_lock) and reference count (files->count).
9 ->file_lock protected accesses to all the file related fields
58 3. For any update to the fd table, files->file_lock must
106 holding files->file_lock. If ->file_lock is dropped, then
111 spin_lock(&files->file_lock);
118 spin_unlock(&files->file_lock);
121 Since locate_fd() can drop ->file_lock (and reacquire ->file_lock),
/Linux-v5.4/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);
91 struct file_lock *p, *_p; in afs_grant_locks()
112 struct file_lock *p, *_p, *next = NULL; in afs_next_locker()
159 struct file_lock *p; in afs_kill_lockers_enoent()
165 struct file_lock, fl_u.afs.link); in afs_kill_lockers_enoent()
463 static int afs_do_setlk(struct file *file, struct file_lock *fl) in afs_do_setlk()
713 static int afs_do_unlk(struct file *file, struct file_lock *fl) in afs_do_unlk()
733 static int afs_do_getlk(struct file *file, struct file_lock *fl) in afs_do_getlk()
775 int afs_lock(struct file *file, int cmd, struct file_lock *fl) in afs_lock()
[all …]
/Linux-v5.4/fs/ceph/
Dlocks.c33 static void ceph_fl_copy_lock(struct file_lock *dst, struct file_lock *src) in ceph_fl_copy_lock()
41 static void ceph_fl_release_lock(struct file_lock *fl) in ceph_fl_release_lock()
64 int cmd, u8 wait, struct file_lock *fl) in ceph_lock_message()
217 int ceph_lock(struct file *file, int cmd, struct file_lock *fl) in ceph_lock()
277 int ceph_flock(struct file *file, int cmd, struct file_lock *fl) in ceph_flock()
334 struct file_lock *lock; in ceph_count_locks()
356 static int lock_to_ceph_filelock(struct file_lock *lock, in lock_to_ceph_filelock()
393 struct file_lock *lock; in ceph_encode_locks_to_buffer()
/Linux-v5.4/fs/dlm/
Dplock.c30 int (*callback)(struct file_lock *fl, int result);
33 struct file_lock flc;
78 struct file *file, struct file_lock *fl) in do_unlock_close()
102 int cmd, struct file_lock *fl) in dlm_posix_lock()
188 struct file_lock *fl; in dlm_plock_callback()
189 struct file_lock *flc; in dlm_plock_callback()
190 int (*notify)(struct file_lock *fl, int result) = NULL; in dlm_plock_callback()
242 struct file_lock *fl) in dlm_posix_unlock()
316 struct file_lock *fl) in dlm_posix_get()
/Linux-v5.4/include/linux/lockd/
Dlockd.h214 struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
220 int nlmclnt_reclaim(struct nlm_host *, struct file_lock *,
285 void nlmsvc_locks_init_private(struct file_lock *, struct nlm_host *, pid_t);
363 static inline int nlm_compare_locks(const struct file_lock *fl1, in nlm_compare_locks()
364 const struct file_lock *fl2) in nlm_compare_locks()
/Linux-v5.4/fs/proc/
Dfd.c37 spin_lock(&files->file_lock); in seq_show()
49 spin_unlock(&files->file_lock); in seq_show()
163 spin_lock(&files->file_lock); in proc_fd_link()
170 spin_unlock(&files->file_lock); in proc_fd_link()
/Linux-v5.4/Documentation/RCU/
Dlockdep.txt69 lockdep_is_held(&files->file_lock) ||
77 2. with files->file_lock held, or
81 RCU read-side critical sections, in case (2) the ->file_lock prevents
88 lockdep_is_held(&files->file_lock) ||
/Linux-v5.4/drivers/misc/genwqe/
Dcard_dev.c37 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_open_files()
39 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_open_files()
48 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_add_file()
50 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_add_file()
57 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_del_file()
59 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_del_file()
261 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_kill_fasync()
267 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_kill_fasync()
277 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_terminate()
282 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_terminate()
/Linux-v5.4/fs/nfsd/
Dnfs4state.c4440 nfsd_break_deleg_cb(struct file_lock *fl) in nfsd_break_deleg_cb()
4461 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
4779 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
4782 struct file_lock *fl; in nfs4_alloc_init_lease()
4804 struct file_lock *fl; in nfs4_set_delegation()
6079 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
6106 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
6135 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
6414 struct file_lock *file_lock = NULL; in nfsd4_lock() local
6415 struct file_lock *conflock = NULL; in nfsd4_lock()
[all …]
/Linux-v5.4/fs/9p/
Dvfs_file.c116 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock()
135 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock()
241 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) in v9fs_file_getlock()
306 static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock_dotl()
342 struct file_lock *fl) in v9fs_file_flock_dotl()
/Linux-v5.4/fs/nfs/
Dfile.c657 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_getlk()
686 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_unlk()
722 do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_setlk()
766 int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) in nfs_lock()
805 int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) in nfs_flock()
/Linux-v5.4/kernel/
Dkcmp.c123 spin_lock(&files->file_lock); in kcmp_epoll_target()
129 spin_unlock(&files->file_lock); in kcmp_epoll_target()

123