| /linux/include/linux/ |
| H A D | filelock.h | 29 struct file_lock; 33 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 34 void (*fl_release_private)(struct file_lock *); 41 void (*lm_notify)(struct file_lock *); /* unblock callback */ 42 int (*lm_grant)(struct file_lock *, int); 43 bool (*lm_lock_expirable)(struct file_lock *cfl); 113 struct file_lock { struct 166 static inline bool lock_is_unlock(struct file_lock *fl) in lock_is_unlock() 171 static inline bool lock_is_read(struct file_lock *fl) in lock_is_read() 176 static inline bool lock_is_write(struct file_lock *fl) in lock_is_write() [all …]
|
| H A D | dlm_plock.h | 11 int cmd, struct file_lock *fl); 13 struct file_lock *fl); 15 struct file_lock *fl); 17 struct file_lock *fl);
|
| /linux/fs/ |
| H A D | locks.c | 72 static struct file_lock *file_lock(struct file_lock_core *flc) in file_lock() function 74 return container_of(flc, struct file_lock, c); in file_lock() 273 struct file_lock *locks_alloc_lock(void) in locks_alloc_lock() 275 struct file_lock *fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL); in locks_alloc_lock() 296 void locks_release_private(struct file_lock *fl) in locks_release_private() 350 void locks_free_lock(struct file_lock *fl) in locks_free_lock() 372 locks_free_lock(file_lock(flc)); in locks_dispose_list() 388 void locks_init_lock(struct file_lock *fl) in locks_init_lock() 390 memset(fl, 0, sizeof(struct file_lock)); in locks_init_lock() 405 void locks_copy_conflock(struct file_lock *new, struct file_lock *fl) in locks_copy_conflock() [all …]
|
| /linux/fs/ocfs2/ |
| H A D | locks.c | 24 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()
|
| H A D | locks.h | 13 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);
|
| /linux/fs/lockd/ |
| H A D | clntproc.c | 30 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() 162 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data) in nlmclnt_proc() 432 nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_test() 465 static void nlmclnt_locks_copy_lock(struct file_lock *new, struct file_lock *fl) in nlmclnt_locks_copy_lock() 474 static void nlmclnt_locks_release_private(struct file_lock *fl) in nlmclnt_locks_release_private() [all …]
|
| H A D | clntlock.c | 88 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()
|
| H A D | svcsubs.c | 74 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()
|
| H A D | svclock.c | 149 struct file_lock *fl; in nlmsvc_lookup_block() 409 void nlmsvc_locks_init_private(struct file_lock *fl, struct nlm_host *host, in nlmsvc_locks_init_private() 740 struct file_lock *fl = &block->b_call->a_args.lock.fl; in nlmsvc_cancel_blocked() 769 static int nlmsvc_grant_deferred(struct file_lock *fl, int result) in nlmsvc_grant_deferred() 808 nlmsvc_notify_blocked(struct file_lock *fl) in nlmsvc_notify_blocked() 995 struct file_lock *fl; in nlmsvc_grant_reply()
|
| /linux/Documentation/filesystems/ |
| H A D | files.rst | 11 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 89 holding files->file_lock. If ->file_lock is dropped, then 95 spin_lock(&files->file_lock); 102 spin_unlock(&files->file_lock); 105 Since locate_fd() can drop ->file_lock (and reacquire ->file_lock),
|
| H A D | locking.rst | 376 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 377 void (*fl_release_private)(struct file_lock *); 399 void (*lm_notify)(struct file_lock *); /* unblock callback */ 400 int (*lm_grant)(struct file_lock *, struct file_lock *, int); 401 void (*lm_break)(struct file_lock *); /* break_lease callback */ 402 int (*lm_change)(struct file_lock **, int); 403 bool (*lm_breaker_owns_lease)(struct file_lock *); 404 bool (*lm_lock_expirable)(struct file_lock *); 490 int (*lock) (struct file *, int, struct file_lock *); 494 int (*flock) (struct file *, int, struct file_lock *); [all …]
|
| /linux/include/linux/lockd/ |
| H A D | lockd.h | 132 struct file_lock *b_lock; /* local file lock */ 218 struct file_lock *fl); 225 int nlmclnt_reclaim(struct nlm_host *, struct file_lock *, 277 int lock_to_openmode(struct file_lock *); 291 void nlmsvc_locks_init_private(struct file_lock *, struct nlm_host *, pid_t); 382 static inline int nlm_compare_locks(const struct file_lock *fl1, in nlm_compare_locks() 383 const struct file_lock *fl2) in nlm_compare_locks()
|
| H A D | bind.h | 81 extern int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data);
|
| H A D | xdr4.h | 25 void nlm4svc_set_file_lock_range(struct file_lock *fl, u64 off, u64 len);
|
| /linux/fs/ceph/ |
| H A D | locks.c | 34 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() 231 static int try_unlock_file(struct file *file, struct file_lock *fl) in try_unlock_file() 250 int ceph_lock(struct file *file, int cmd, struct file_lock *fl) in ceph_lock() 317 int ceph_flock(struct file *file, int cmd, struct file_lock *fl) in ceph_flock() 383 struct file_lock *lock; in ceph_count_locks() 406 struct file_lock *lock, in lock_to_ceph_filelock() 446 struct file_lock *lock; in ceph_encode_locks_to_buffer()
|
| /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); 92 struct file_lock *p, *_p; in afs_grant_locks() 113 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() 451 static int afs_do_setlk(struct file *file, struct file_lock *fl) in afs_do_setlk() 701 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/include/trace/events/ |
| H A D | filelock.h | 64 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret), 69 __field(struct file_lock *, fl) 105 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret), 109 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret), 113 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret), 117 TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
|
| /linux/fs/dlm/ |
| H A D | plock.c | 28 struct file_lock flc; 29 int (*callback)(struct file_lock *fl, int result); 123 int cmd, struct file_lock *fl) in dlm_posix_lock() 242 struct file_lock *fl; in dlm_plock_callback() 243 struct file_lock *flc; in dlm_plock_callback() 244 int (*notify)(struct file_lock *fl, int result) = NULL; in dlm_plock_callback() 289 struct file_lock *fl) in dlm_posix_unlock() 360 struct file_lock *fl) in dlm_posix_cancel() 423 struct file_lock *fl) in dlm_posix_get()
|
| /linux/fs/9p/ |
| H A D | vfs_file.c | 109 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock() 123 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock() 228 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) in v9fs_file_getlock() 293 static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock_dotl() 324 struct file_lock *fl) in v9fs_file_flock_dotl()
|
| /linux/drivers/misc/genwqe/ |
| H A D | card_dev.c | 37 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/drivers/fsi/ |
| H A D | fsi-sbefifo.c | 136 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/io_uring/ |
| H A D | openclose.c | 239 spin_lock(&files->file_lock); in io_close() 242 spin_unlock(&files->file_lock); in io_close() 248 spin_unlock(&files->file_lock); in io_close() 253 spin_unlock(&files->file_lock); in io_close()
|
| /linux/fs/smb/client/ |
| H A D | cifsfs.h | 101 extern int cifs_flock(struct file *pfile, int cmd, struct file_lock *plock); 102 extern int cifs_lock(struct file *, int, struct file_lock *);
|
| /linux/fs/nfsd/ |
| H A D | nfs4state.c | 7932 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset() 7960 nfsd4_lm_lock_expirable(struct file_lock *cfl) in nfsd4_lm_lock_expirable() 7982 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify() 8016 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied() 8299 struct file_lock *file_lock = NULL; in nfsd4_lock() local 8300 struct file_lock *conflock = NULL; in nfsd4_lock() 8417 file_lock = &nbl->nbl_lock; in nfsd4_lock() 8418 file_lock->c.flc_type = type; in nfsd4_lock() 8419 file_lock->c.flc_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); in nfsd4_lock() 8420 file_lock->c.flc_pid = current->tgid; in nfsd4_lock() [all …]
|
| /linux/fs/nfs/ |
| H A D | file.c | 784 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_getlk() 813 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_unlk() 849 do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_setlk() 893 int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) in nfs_lock() 931 int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) in nfs_flock()
|