Home
last modified time | relevance | path

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

1234

/linux-6.6.21/include/linux/
Dfilelock.h29 struct file_lock;
32 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
33 void (*fl_release_private)(struct file_lock *);
40 void (*lm_notify)(struct file_lock *); /* unblock callback */
41 int (*lm_grant)(struct file_lock *, int);
42 bool (*lm_break)(struct file_lock *);
43 int (*lm_change)(struct file_lock *, int, struct list_head *);
44 void (*lm_setup)(struct file_lock *, void **);
45 bool (*lm_breaker_owns_lease)(struct file_lock *);
46 bool (*lm_lock_expirable)(struct file_lock *cfl);
[all …]
Ddlm_plock.h11 int cmd, struct file_lock *fl);
13 struct file_lock *fl);
15 struct file_lock *fl);
17 struct file_lock *fl);
Dfdtable.h62 spinlock_t file_lock ____cacheline_aligned_in_smp;
75 rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock))
96 RCU_LOCKDEP_WARN(!lockdep_is_held(&files->file_lock), in files_lookup_fd_locked()
/linux-6.6.21/fs/
Dlocks.c79 static bool lease_breaking(struct file_lock *fl) in lease_breaking()
84 static int target_leasetype(struct file_lock *fl) in target_leasetype()
208 struct file_lock *fl; in locks_dump_ctx_list()
236 struct file_lock *fl; in locks_check_ctx_file_list()
259 static void locks_init_lock_heads(struct file_lock *fl) in locks_init_lock_heads()
269 struct file_lock *locks_alloc_lock(void) in locks_alloc_lock()
271 struct file_lock *fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL); in locks_alloc_lock()
280 void locks_release_private(struct file_lock *fl) in locks_release_private()
316 struct file_lock *fl; in locks_owner_has_blockers()
333 void locks_free_lock(struct file_lock *fl) in locks_free_lock()
[all …]
Dfile.c170 __releases(files->file_lock) in expand_fdtable()
171 __acquires(files->file_lock) in expand_fdtable()
175 spin_unlock(&files->file_lock); in expand_fdtable()
184 spin_lock(&files->file_lock); in expand_fdtable()
215 __releases(files->file_lock) in expand_files()
216 __acquires(files->file_lock) in expand_files()
233 spin_unlock(&files->file_lock); in expand_files()
236 spin_lock(&files->file_lock); in expand_files()
330 spin_lock_init(&newf->file_lock); in dup_fd()
341 spin_lock(&oldf->file_lock); in dup_fd()
[all …]
/linux-6.6.21/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-6.6.21/fs/ocfs2/
Dlocks.c24 int cmd, struct file_lock *fl) in ocfs2_do_flock()
40 struct file_lock request; in ocfs2_do_flock()
82 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock()
98 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_flock()
116 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_lock()
Dlocks.h13 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl);
14 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
Dstackglue.h23 struct file_lock;
210 struct file_lock *fl);
282 struct file *file, int cmd, struct file_lock *fl);
/linux-6.6.21/fs/lockd/
Dclntproc.c30 static int nlmclnt_test(struct nlm_rqst *, struct file_lock *);
31 static int nlmclnt_lock(struct nlm_rqst *, struct file_lock *);
32 static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *);
34 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host);
35 static int nlmclnt_cancel(struct nlm_host *, int , struct file_lock *);
129 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_setlockargs()
161 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data) in nlmclnt_proc()
431 nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_test()
463 static void nlmclnt_locks_copy_lock(struct file_lock *new, struct file_lock *fl) in nlmclnt_locks_copy_lock()
472 static void nlmclnt_locks_release_private(struct file_lock *fl) in nlmclnt_locks_release_private()
[all …]
Dclntlock.c88 void nlmclnt_prepare_block(struct nlm_wait *block, struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block()
163 const struct file_lock *fl = &lock->fl; in nlmclnt_grant()
174 struct file_lock *fl_blocked = block->b_lock; in nlmclnt_grant()
232 struct file_lock *fl, *next; in reclaimer()
Dsvcsubs.c74 int lock_to_openmode(struct file_lock *lock) in lock_to_openmode()
179 static int nlm_unlock_files(struct nlm_file *file, const struct file_lock *fl) in nlm_unlock_files()
181 struct file_lock lock; in nlm_unlock_files()
212 struct file_lock *fl; in nlm_traverse_locks()
267 struct file_lock *fl; in nlm_file_inuse()
Dxdr4.c36 void nlm4svc_set_file_lock_range(struct file_lock *fl, u64 off, u64 len) in nlm4svc_set_file_lock_range()
76 struct file_lock *fl = &lock->fl; in svcxdr_decode_lock()
101 const struct file_lock *fl = &lock->fl; in svcxdr_encode_holder()
/linux-6.6.21/Documentation/filesystems/
Dfiles.rst11 with a lock (files->file_lock) and reference count (files->count).
12 ->file_lock protected accesses to all the file related fields
61 3. For any update to the fd table, files->file_lock must
110 holding files->file_lock. If ->file_lock is dropped, then
116 spin_lock(&files->file_lock);
123 spin_unlock(&files->file_lock);
126 Since locate_fd() can drop ->file_lock (and reacquire ->file_lock),
/linux-6.6.21/include/linux/lockd/
Dlockd.h131 struct file_lock *b_lock; /* local file lock */
217 struct file_lock *fl);
224 int nlmclnt_reclaim(struct nlm_host *, struct file_lock *,
276 int lock_to_openmode(struct file_lock *);
290 void nlmsvc_locks_init_private(struct file_lock *, struct nlm_host *, pid_t);
375 static inline int nlm_compare_locks(const struct file_lock *fl1, in nlm_compare_locks()
376 const struct file_lock *fl2) in nlm_compare_locks()
/linux-6.6.21/fs/ceph/
Dlocks.c34 static void ceph_fl_copy_lock(struct file_lock *dst, struct file_lock *src) in ceph_fl_copy_lock()
45 static void ceph_fl_release_lock(struct file_lock *fl) in ceph_fl_release_lock()
77 int cmd, u8 wait, struct file_lock *fl) in ceph_lock_message()
226 static int try_unlock_file(struct file *file, struct file_lock *fl) in try_unlock_file()
245 int ceph_lock(struct file *file, int cmd, struct file_lock *fl) in ceph_lock()
311 int ceph_flock(struct file *file, int cmd, struct file_lock *fl) in ceph_flock()
374 struct file_lock *lock; in ceph_count_locks()
396 static int lock_to_ceph_filelock(struct file_lock *lock, in lock_to_ceph_filelock()
433 struct file_lock *lock; in ceph_encode_locks_to_buffer()
/linux-6.6.21/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);
92 struct file_lock *p, *_p; in afs_grant_locks()
113 struct file_lock *p, *_p, *next = NULL; in afs_next_locker()
160 struct file_lock *p; in afs_kill_lockers_enoent()
166 struct file_lock, fl_u.afs.link); in afs_kill_lockers_enoent()
452 static int afs_do_setlk(struct file *file, struct file_lock *fl) in afs_do_setlk()
702 static int afs_do_unlk(struct file *file, struct file_lock *fl) in afs_do_unlk()
722 static int afs_do_getlk(struct file *file, struct file_lock *fl) in afs_do_getlk()
764 int afs_lock(struct file *file, int cmd, struct file_lock *fl) in afs_lock()
[all …]
/linux-6.6.21/io_uring/
Dopenclose.c232 spin_lock(&files->file_lock); in io_close()
235 spin_unlock(&files->file_lock); in io_close()
239 lockdep_is_held(&files->file_lock)); in io_close()
241 spin_unlock(&files->file_lock); in io_close()
247 spin_unlock(&files->file_lock); in io_close()
252 spin_unlock(&files->file_lock); in io_close()
/linux-6.6.21/fs/dlm/
Dplock.c28 struct file_lock flc;
29 int (*callback)(struct file_lock *fl, int result);
123 int cmd, struct file_lock *fl) in dlm_posix_lock()
246 struct file_lock *fl; in dlm_plock_callback()
247 struct file_lock *flc; in dlm_plock_callback()
248 int (*notify)(struct file_lock *fl, int result) = NULL; in dlm_plock_callback()
293 struct file_lock *fl) in dlm_posix_unlock()
367 struct file_lock *fl) in dlm_posix_cancel()
430 struct file_lock *fl) in dlm_posix_get()
/linux-6.6.21/fs/smb/server/
Dvfs.h140 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock);
141 int ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout);
142 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock);
/linux-6.6.21/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()
264 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_kill_fasync()
270 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_kill_fasync()
280 spin_lock_irqsave(&cd->file_lock, flags); in genwqe_terminate()
285 spin_unlock_irqrestore(&cd->file_lock, flags); in genwqe_terminate()
/linux-6.6.21/drivers/fsi/
Dfsi-sbefifo.c136 struct mutex file_lock; member
806 mutex_init(&user->file_lock); in sbefifo_user_open()
829 mutex_lock(&user->file_lock); in sbefifo_user_read()
864 mutex_unlock(&user->file_lock); in sbefifo_user_read()
883 mutex_lock(&user->file_lock); in sbefifo_user_write()
925 mutex_unlock(&user->file_lock); in sbefifo_user_write()
991 mutex_lock(&user->file_lock); in sbefifo_user_ioctl()
1000 mutex_unlock(&user->file_lock); in sbefifo_user_ioctl()
/linux-6.6.21/fs/nfsd/
Dnfs4state.c4924 nfsd_break_deleg_cb(struct file_lock *fl) in nfsd_break_deleg_cb()
4960 static bool nfsd_breaker_owns_lease(struct file_lock *fl) in nfsd_breaker_owns_lease()
4977 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
5331 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
5334 struct file_lock *fl; in nfs4_alloc_init_lease()
5463 struct file_lock *fl; in nfs4_set_delegation()
7120 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
7148 nfsd4_lm_lock_expirable(struct file_lock *cfl) in nfsd4_lm_lock_expirable()
7170 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
7204 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
[all …]
/linux-6.6.21/fs/9p/
Dvfs_file.c104 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) 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()
223 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) in v9fs_file_getlock()
288 static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock_dotl()
319 struct file_lock *fl) in v9fs_file_flock_dotl()
/linux-6.6.21/Documentation/RCU/
Dlockdep.rst76 lockdep_is_held(&files->file_lock) ||
84 2. with files->file_lock held, or
88 RCU read-side critical sections, in case (2) the ->file_lock prevents
95 lockdep_is_held(&files->file_lock) ||

1234