Searched refs:file_lock (Results 1 - 71 of 71) sorted by relevance

/linux-4.1.27/include/linux/
H A Ddlm_plock.h14 int cmd, struct file_lock *fl);
16 struct file_lock *fl);
18 struct file_lock *fl);
H A Dfdtable.h55 spinlock_t file_lock ____cacheline_aligned_in_smp;
67 rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock))
87 lockdep_is_held(&files->file_lock), fcheck_files()
H A Dfs.h915 struct file_lock;
918 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
919 void (*fl_release_private)(struct file_lock *);
923 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
924 unsigned long (*lm_owner_key)(struct file_lock *);
927 void (*lm_notify)(struct file_lock *); /* unblock callback */
928 int (*lm_grant)(struct file_lock *, int);
929 bool (*lm_break)(struct file_lock *);
930 int (*lm_change)(struct file_lock *, int, struct list_head *);
931 void (*lm_setup)(struct file_lock *, void **);
947 * struct file_lock represents a generic "file lock". It's used to represent
963 struct file_lock { struct
964 struct file_lock *fl_next; /* singly linked list for this inode */
1030 void locks_free_lock(struct file_lock *fl);
1031 extern void locks_init_lock(struct file_lock *);
1032 extern struct file_lock * locks_alloc_lock(void);
1033 extern void locks_copy_lock(struct file_lock *, struct file_lock *);
1034 extern void locks_copy_conflock(struct file_lock *, struct file_lock *);
1037 extern void locks_release_private(struct file_lock *);
1038 extern void posix_test_lock(struct file *, struct file_lock *);
1039 extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *);
1040 extern int posix_lock_inode_wait(struct inode *, struct file_lock *);
1041 extern int posix_unblock_lock(struct file_lock *);
1042 extern int vfs_test_lock(struct file *, struct file_lock *);
1043 extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *);
1044 extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl);
1045 extern int flock_lock_inode_wait(struct inode *inode, struct file_lock *fl);
1048 extern int generic_setlease(struct file *, long, struct file_lock **, void **priv);
1049 extern int vfs_setlease(struct file *, long, struct file_lock **, void **);
1050 extern int lease_modify(struct file_lock *, int, struct list_head *);
1095 static inline void locks_init_lock(struct file_lock *fl) locks_init_lock()
1100 static inline void locks_copy_conflock(struct file_lock *new, struct file_lock *fl) locks_copy_conflock()
1105 static inline void locks_copy_lock(struct file_lock *new, struct file_lock *fl) locks_copy_lock()
1120 static inline void posix_test_lock(struct file *filp, struct file_lock *fl) posix_test_lock()
1125 static inline int posix_lock_file(struct file *filp, struct file_lock *fl, posix_lock_file()
1126 struct file_lock *conflock) posix_lock_file()
1132 struct file_lock *fl) posix_lock_inode_wait()
1137 static inline int posix_unblock_lock(struct file_lock *waiter) posix_unblock_lock()
1142 static inline int vfs_test_lock(struct file *filp, struct file_lock *fl) vfs_test_lock()
1148 struct file_lock *fl, struct file_lock *conf) vfs_lock_file()
1153 static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl) vfs_cancel_lock()
1159 struct file_lock *request) flock_lock_inode_wait()
1175 struct file_lock **flp, void **priv) generic_setlease()
1181 struct file_lock **lease, void **priv) vfs_setlease()
1186 static inline int lease_modify(struct file_lock *fl, int arg, lease_modify()
1202 static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl) posix_lock_file_wait()
1207 static inline int flock_lock_file_wait(struct file *filp, struct file_lock *fl) flock_lock_file_wait()
1608 int (*lock) (struct file *, int, struct file_lock *);
1612 int (*flock) (struct file *, int, struct file_lock *);
1615 int (*setlease)(struct file *, long, struct file_lock **, void **);
2786 extern int simple_nosetlease(struct file *, long, struct file_lock **, void **);
H A Dnfs_xdr.h424 struct file_lock * fl;
446 struct file_lock * fl;
460 struct file_lock * fl;
466 struct file_lock * denied; /* LOCK, LOCKT failed */
1500 int (*lock)(struct file *, int, struct file_lock *);
1501 int (*lock_check_bounds)(const struct file_lock *);
H A Dsecurity.h621 * @file_lock:
1586 int (*file_lock) (struct file *file, unsigned int cmd); member in struct:security_operations
/linux-4.1.27/include/trace/events/
H A Dfilelock.h39 TP_PROTO(struct inode *inode, struct file_lock *fl),
44 __field(struct file_lock *, fl)
47 __field(struct file_lock *, fl_next)
75 DEFINE_EVENT(filelock_lease, break_lease_noblock, TP_PROTO(struct inode *inode, struct file_lock *fl),
78 DEFINE_EVENT(filelock_lease, break_lease_block, TP_PROTO(struct inode *inode, struct file_lock *fl),
81 DEFINE_EVENT(filelock_lease, break_lease_unblock, TP_PROTO(struct inode *inode, struct file_lock *fl),
84 DEFINE_EVENT(filelock_lease, generic_add_lease, TP_PROTO(struct inode *inode, struct file_lock *fl),
87 DEFINE_EVENT(filelock_lease, generic_delete_lease, TP_PROTO(struct inode *inode, struct file_lock *fl),
90 DEFINE_EVENT(filelock_lease, time_out_leases, TP_PROTO(struct inode *inode, struct file_lock *fl),
/linux-4.1.27/fs/
H A Dlocks.c143 static bool lease_breaking(struct file_lock *fl) lease_breaking()
148 static int target_leasetype(struct file_lock *fl) target_leasetype()
188 * pointer for file_lock structures that are acting as lock requests (in
243 static void locks_init_lock_heads(struct file_lock *fl) locks_init_lock_heads()
252 struct file_lock *locks_alloc_lock(void) locks_alloc_lock()
254 struct file_lock *fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL); locks_alloc_lock()
263 void locks_release_private(struct file_lock *fl) locks_release_private()
282 void locks_free_lock(struct file_lock *fl) locks_free_lock()
297 struct file_lock *fl; locks_dispose_list()
300 fl = list_first_entry(dispose, struct file_lock, fl_list); locks_dispose_list()
306 void locks_init_lock(struct file_lock *fl) locks_init_lock()
308 memset(fl, 0, sizeof(struct file_lock)); locks_init_lock()
315 * Initialize a new lock from an existing file_lock structure.
317 void locks_copy_conflock(struct file_lock *new, struct file_lock *fl) locks_copy_conflock()
336 void locks_copy_lock(struct file_lock *new, struct file_lock *fl) locks_copy_lock()
368 /* Fill in a file_lock structure with an appropriate FLOCK lock. */
369 static struct file_lock * flock_make_lock()
372 struct file_lock *fl; flock_make_lock()
392 static int assign_type(struct file_lock *fl, long type) assign_type()
406 static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, flock64_to_posix_lock()
453 /* Verify a "struct flock" and copy it to a "struct file_lock" as a POSIX
456 static int flock_to_posix_lock(struct file *filp, struct file_lock *fl, flock_to_posix_lock()
471 lease_break_callback(struct file_lock *fl) lease_break_callback()
478 lease_setup(struct file_lock *fl, void **priv) lease_setup()
503 static int lease_init(struct file *filp, long type, struct file_lock *fl) lease_init()
520 /* Allocate a file_lock initialised to this type of lease */ lease_alloc()
521 static struct file_lock *lease_alloc(struct file *filp, long type) lease_alloc()
523 struct file_lock *fl = locks_alloc_lock(); lease_alloc()
539 static inline int locks_overlap(struct file_lock *fl1, struct file_lock *fl2) locks_overlap()
548 static int posix_same_owner(struct file_lock *fl1, struct file_lock *fl2) posix_same_owner()
557 static void locks_insert_global_locks(struct file_lock *fl) locks_insert_global_locks()
566 static void locks_delete_global_locks(struct file_lock *fl) locks_delete_global_locks()
581 posix_owner_key(struct file_lock *fl) posix_owner_key()
588 static void locks_insert_global_blocked(struct file_lock *waiter) locks_insert_global_blocked()
595 static void locks_delete_global_blocked(struct file_lock *waiter) locks_delete_global_blocked()
607 static void __locks_delete_block(struct file_lock *waiter) __locks_delete_block()
614 static void locks_delete_block(struct file_lock *waiter) locks_delete_block()
631 static void __locks_insert_block(struct file_lock *blocker, __locks_insert_block()
632 struct file_lock *waiter) __locks_insert_block()
642 static void locks_insert_block(struct file_lock *blocker, locks_insert_block()
643 struct file_lock *waiter) locks_insert_block()
655 static void locks_wake_up_blocks(struct file_lock *blocker) locks_wake_up_blocks()
669 struct file_lock *waiter; locks_wake_up_blocks()
672 struct file_lock, fl_block); locks_wake_up_blocks()
683 locks_insert_lock_ctx(struct file_lock *fl, struct list_head *before) locks_insert_lock_ctx()
691 locks_unlink_lock_ctx(struct file_lock *fl) locks_unlink_lock_ctx()
703 locks_delete_lock_ctx(struct file_lock *fl, struct list_head *dispose) locks_delete_lock_ctx()
715 static int locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) locks_conflict()
727 static int posix_locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) posix_locks_conflict()
745 static int flock_locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) flock_locks_conflict()
759 posix_test_lock(struct file *filp, struct file_lock *fl) posix_test_lock()
761 struct file_lock *cfl; posix_test_lock()
823 static struct file_lock *what_owner_is_waiting_for(struct file_lock *block_fl) what_owner_is_waiting_for()
825 struct file_lock *fl; what_owner_is_waiting_for()
835 static int posix_locks_deadlock(struct file_lock *caller_fl, posix_locks_deadlock()
836 struct file_lock *block_fl) posix_locks_deadlock()
865 static int flock_lock_inode(struct inode *inode, struct file_lock *request) flock_lock_inode()
867 struct file_lock *new_fl = NULL; flock_lock_inode()
868 struct file_lock *fl; flock_lock_inode()
933 static int __posix_lock_file(struct inode *inode, struct file_lock *request, struct file_lock *conflock) __posix_lock_file()
935 struct file_lock *fl, *tmp; __posix_lock_file()
936 struct file_lock *new_fl = NULL; __posix_lock_file()
937 struct file_lock *new_fl2 = NULL; __posix_lock_file()
938 struct file_lock *left = NULL; __posix_lock_file()
939 struct file_lock *right = NULL; __posix_lock_file()
950 * We may need two file_lock structures for this operation, __posix_lock_file()
1158 int posix_lock_file(struct file *filp, struct file_lock *fl, posix_lock_file()
1159 struct file_lock *conflock) posix_lock_file()
1173 int posix_lock_inode_wait(struct inode *inode, struct file_lock *fl) posix_lock_inode_wait()
1204 struct file_lock *fl; locks_mandatory_locked()
1243 struct file_lock fl; locks_mandatory_area()
1291 static void lease_clear_pending(struct file_lock *fl, int arg) lease_clear_pending()
1303 int lease_modify(struct file_lock *fl, int arg, struct list_head *dispose) lease_modify()
1338 struct file_lock *fl, *tmp; time_out_leases()
1351 static bool leases_conflict(struct file_lock *lease, struct file_lock *breaker) leases_conflict()
1361 any_leases_conflict(struct inode *inode, struct file_lock *breaker) any_leases_conflict()
1364 struct file_lock *fl; any_leases_conflict()
1392 struct file_lock *new_fl, *fl, *tmp; __break_lease()
1450 fl = list_first_entry(&ctx->flc_lease, struct file_lock, fl_list); __break_lease()
1498 struct file_lock *fl; lease_get_mtime()
1504 struct file_lock, fl_list); lease_get_mtime()
1544 struct file_lock *fl; fcntl_getlease()
1595 generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **priv) generic_add_lease()
1597 struct file_lock *fl, *my_fl = NULL, *lease; generic_add_lease()
1712 struct file_lock *fl, *victim = NULL; generic_delete_lease()
1743 * @flp: input - file_lock to use, output - file_lock inserted
1750 int generic_setlease(struct file *filp, long arg, struct file_lock **flp, generic_setlease()
1786 * @lease: file_lock to use when adding a lease
1800 vfs_setlease(struct file *filp, long arg, struct file_lock **lease, void **priv) vfs_setlease()
1811 struct file_lock *fl; do_fcntl_add_lease()
1858 int flock_lock_inode_wait(struct inode *inode, struct file_lock *fl) flock_lock_inode_wait()
1899 struct file_lock *lock; SYSCALL_DEFINE2()
1952 int vfs_test_lock(struct file *filp, struct file_lock *fl) vfs_test_lock()
1961 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) posix_lock_to_flock()
1983 static void posix_lock_to_flock64(struct flock64 *flock, struct file_lock *fl) posix_lock_to_flock64()
1999 struct file_lock file_lock; fcntl_getlk() local
2010 error = flock_to_posix_lock(filp, &file_lock, &flock); fcntl_getlk()
2020 file_lock.fl_flags |= FL_OFDLCK; fcntl_getlk()
2021 file_lock.fl_owner = filp; fcntl_getlk()
2024 error = vfs_test_lock(filp, &file_lock); fcntl_getlk()
2028 flock.l_type = file_lock.fl_type; fcntl_getlk()
2029 if (file_lock.fl_type != F_UNLCK) { fcntl_getlk()
2030 error = posix_lock_to_flock(&flock, &file_lock); fcntl_getlk()
2038 locks_release_private(&file_lock); fcntl_getlk()
2076 int vfs_lock_file(struct file *filp, unsigned int cmd, struct file_lock *fl, struct file_lock *conf) vfs_lock_file()
2086 struct file_lock *fl) do_lock_file_wait()
2111 check_fmode_for_setlk(struct file_lock *fl) check_fmode_for_setlk()
2131 struct file_lock *file_lock = locks_alloc_lock(); fcntl_setlk() local
2137 if (file_lock == NULL) fcntl_setlk()
2157 error = flock_to_posix_lock(filp, file_lock, &flock); fcntl_setlk()
2161 error = check_fmode_for_setlk(file_lock); fcntl_setlk()
2176 file_lock->fl_flags |= FL_OFDLCK; fcntl_setlk()
2177 file_lock->fl_owner = filp; fcntl_setlk()
2185 file_lock->fl_flags |= FL_OFDLCK; fcntl_setlk()
2186 file_lock->fl_owner = filp; fcntl_setlk()
2189 file_lock->fl_flags |= FL_SLEEP; fcntl_setlk()
2192 error = do_lock_file_wait(filp, cmd, file_lock); fcntl_setlk()
2198 if (!error && file_lock->fl_type != F_UNLCK) { fcntl_setlk()
2204 spin_lock(&current->files->file_lock); fcntl_setlk()
2206 spin_unlock(&current->files->file_lock); fcntl_setlk()
2208 file_lock->fl_type = F_UNLCK; fcntl_setlk()
2209 error = do_lock_file_wait(filp, cmd, file_lock); fcntl_setlk()
2215 locks_free_lock(file_lock); fcntl_setlk()
2225 struct file_lock file_lock; fcntl_getlk64() local
2236 error = flock64_to_posix_lock(filp, &file_lock, &flock); fcntl_getlk64()
2246 file_lock.fl_flags |= FL_OFDLCK; fcntl_getlk64()
2247 file_lock.fl_owner = filp; fcntl_getlk64()
2250 error = vfs_test_lock(filp, &file_lock); fcntl_getlk64()
2254 flock.l_type = file_lock.fl_type; fcntl_getlk64()
2255 if (file_lock.fl_type != F_UNLCK) fcntl_getlk64()
2256 posix_lock_to_flock64(&flock, &file_lock); fcntl_getlk64()
2262 locks_release_private(&file_lock); fcntl_getlk64()
2273 struct file_lock *file_lock = locks_alloc_lock(); fcntl_setlk64() local
2279 if (file_lock == NULL) fcntl_setlk64()
2299 error = flock64_to_posix_lock(filp, file_lock, &flock); fcntl_setlk64()
2303 error = check_fmode_for_setlk(file_lock); fcntl_setlk64()
2318 file_lock->fl_flags |= FL_OFDLCK; fcntl_setlk64()
2319 file_lock->fl_owner = filp; fcntl_setlk64()
2327 file_lock->fl_flags |= FL_OFDLCK; fcntl_setlk64()
2328 file_lock->fl_owner = filp; fcntl_setlk64()
2331 file_lock->fl_flags |= FL_SLEEP; fcntl_setlk64()
2334 error = do_lock_file_wait(filp, cmd, file_lock); fcntl_setlk64()
2340 if (!error && file_lock->fl_type != F_UNLCK) { fcntl_setlk64()
2346 spin_lock(&current->files->file_lock); fcntl_setlk64()
2348 spin_unlock(&current->files->file_lock); fcntl_setlk64()
2350 file_lock->fl_type = F_UNLCK; fcntl_setlk64()
2351 error = do_lock_file_wait(filp, cmd, file_lock); fcntl_setlk64()
2357 locks_free_lock(file_lock); fcntl_setlk64()
2369 struct file_lock lock; locks_remove_posix()
2402 struct file_lock fl = { locks_remove_flock()
2431 struct file_lock *fl, *tmp; locks_remove_lease()
2470 posix_unblock_lock(struct file_lock *waiter) posix_unblock_lock()
2491 int vfs_cancel_lock(struct file *filp, struct file_lock *fl) vfs_cancel_lock()
2509 static void lock_get_status(struct seq_file *f, struct file_lock *fl, lock_get_status()
2588 struct file_lock *fl, *bfl; locks_show()
2590 fl = hlist_entry(v, struct file_lock, fl_link); locks_show()
2604 struct file_lock *fl; __show_fd_locks()
2700 sizeof(struct file_lock), 0, SLAB_PANIC, NULL); filelock_init()
H A Dfile.c140 * The files->file_lock should be held on entry, and will be held on exit.
143 __releases(files->file_lock)
144 __acquires(files->file_lock)
148 spin_unlock(&files->file_lock);
150 spin_lock(&files->file_lock);
185 * The files->file_lock should be held on entry, and will be held on exit.
258 spin_lock_init(&newf->file_lock); dup_fd()
266 spin_lock(&oldf->file_lock); dup_fd()
274 spin_unlock(&oldf->file_lock); dup_fd()
297 spin_lock(&oldf->file_lock); dup_fd()
323 spin_unlock(&oldf->file_lock); dup_fd()
353 * ->file_lock because this is the last reference to the close_files()
439 .file_lock = __SPIN_LOCK_UNLOCKED(init_files.file_lock),
452 spin_lock(&files->file_lock); __alloc_fd()
499 spin_unlock(&files->file_lock); __alloc_fd()
525 spin_lock(&files->file_lock); put_unused_fd()
527 spin_unlock(&files->file_lock); put_unused_fd()
556 spin_lock(&files->file_lock); __fd_install()
560 spin_unlock(&files->file_lock); __fd_install()
578 spin_lock(&files->file_lock); __close_fd()
588 spin_unlock(&files->file_lock); __close_fd()
592 spin_unlock(&files->file_lock); __close_fd()
602 spin_lock(&files->file_lock); do_close_on_exec()
622 spin_unlock(&files->file_lock); do_close_on_exec()
625 spin_lock(&files->file_lock); do_close_on_exec()
629 spin_unlock(&files->file_lock); do_close_on_exec()
729 spin_lock(&files->file_lock); set_close_on_exec()
735 spin_unlock(&files->file_lock); set_close_on_exec()
752 __releases(&files->file_lock)
782 spin_unlock(&files->file_lock);
790 spin_unlock(&files->file_lock);
805 spin_lock(&files->file_lock); replace_fd()
812 spin_unlock(&files->file_lock); replace_fd()
831 spin_lock(&files->file_lock); SYSCALL_DEFINE3()
846 spin_unlock(&files->file_lock); SYSCALL_DEFINE3()
901 spin_lock(&files->file_lock); iterate_fd()
911 spin_unlock(&files->file_lock); iterate_fd()
H A Dlibfs.c1090 simple_nosetlease(struct file *filp, long arg, struct file_lock **flp, simple_nosetlease()
/linux-4.1.27/fs/ocfs2/
H A Dlocks.h29 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl);
30 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
H A Dlocks.c39 int cmd, struct file_lock *fl) ocfs2_do_flock()
70 &(struct file_lock){.fl_type = F_UNLCK}); ocfs2_do_flock()
94 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) ocfs2_do_funlock()
110 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) ocfs2_flock()
130 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) ocfs2_lock()
H A Docfs1_fs_compat.h79 __u8 file_lock; member in struct:ocfs1_disk_lock
H A Dstackglue.h33 struct file_lock;
220 struct file_lock *fl);
292 struct file *file, int cmd, struct file_lock *fl);
H A Dstackglue.c302 struct file *file, int cmd, struct file_lock *fl) ocfs2_plock()
H A Dstack_user.c755 struct file_lock *fl) user_plock()
/linux-4.1.27/include/linux/lockd/
H A Dnlm.h13 /* Maximum file offset in file_lock.fl_end */
H A Dbind.h56 struct file_lock *fl);
H A Dlockd.h208 struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
214 int nlmclnt_reclaim(struct nlm_host *, struct file_lock *,
351 static inline int nlm_compare_locks(const struct file_lock *fl1, nlm_compare_locks()
352 const struct file_lock *fl2) nlm_compare_locks()
H A Dxdr.h43 struct file_lock fl;
/linux-4.1.27/fs/lockd/
H A Dclntproc.c26 static int nlmclnt_test(struct nlm_rqst *, struct file_lock *);
27 static int nlmclnt_lock(struct nlm_rqst *, struct file_lock *);
28 static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *);
30 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host);
31 static int nlmclnt_cancel(struct nlm_host *, int , struct file_lock *);
124 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) nlmclnt_setlockargs()
155 int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) nlmclnt_proc()
416 nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) nlmclnt_test()
445 static void nlmclnt_locks_copy_lock(struct file_lock *new, struct file_lock *fl) nlmclnt_locks_copy_lock()
454 static void nlmclnt_locks_release_private(struct file_lock *fl) nlmclnt_locks_release_private()
467 static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host) nlmclnt_locks_init_private()
475 static int do_vfs_lock(struct file_lock *fl) do_vfs_lock()
512 nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl) nlmclnt_lock()
619 nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl, nlmclnt_reclaim()
660 nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) nlmclnt_unlock()
743 static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl) nlmclnt_cancel()
H A Dclntlock.c38 struct file_lock * b_lock; /* local file lock */
98 struct nlm_wait *nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl) nlmclnt_prepare_block()
164 const struct file_lock *fl = &lock->fl; nlmclnt_grant()
175 struct file_lock *fl_blocked = block->b_lock; nlmclnt_grant()
232 struct file_lock *fl, *next; reclaimer()
H A Dsvcsubs.c166 struct file_lock *fl; nlm_traverse_locks()
184 struct file_lock lock = *fl; nlm_traverse_locks()
228 struct file_lock *fl; nlm_file_inuse()
H A Dxdr.c116 struct file_lock *fl = &lock->fl; nlm_decode_lock()
158 struct file_lock *fl = &resp->lock.fl; nlm_encode_testres()
H A Dxdr4.c108 struct file_lock *fl = &lock->fl; nlm4_decode_lock()
151 struct file_lock *fl = &resp->lock.fl; nlm4_encode_testres()
H A Dsvclock.c147 struct file_lock *fl; nlmsvc_lookup_block()
637 static int nlmsvc_grant_deferred(struct file_lock *fl, int result) nlmsvc_grant_deferred()
676 nlmsvc_notify_blocked(struct file_lock *fl) nlmsvc_notify_blocked()
694 static int nlmsvc_same_owner(struct file_lock *fl1, struct file_lock *fl2) nlmsvc_same_owner()
705 nlmsvc_owner_key(struct file_lock *fl) nlmsvc_owner_key()
H A Dclnt4xdr.c67 const struct file_lock *fl = &lock->fl; nlm4_compute_offsets()
281 struct file_lock *fl = &lock->fl; decode_nlm4_holder()
H A Dclntxdr.c63 const struct file_lock *fl = &lock->fl; nlm_compute_offsets()
276 struct file_lock *fl = &lock->fl; decode_nlm_holder()
H A Dsvc4proc.c46 /* Set up the missing parts of the file_lock structure */ nlm4svc_retrieve_args()
H A Dsvcproc.c76 /* Set up the missing parts of the file_lock structure */ nlmsvc_retrieve_args()
/linux-4.1.27/fs/afs/
H A 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) afs_grant_locks()
85 struct file_lock *p, *_p; afs_grant_locks()
110 struct file_lock *fl; afs_lock_work()
145 struct file_lock, fl_u.afs.link); afs_lock_work()
179 struct file_lock, fl_u.afs.link); afs_lock_work()
203 struct file_lock, fl_u.afs.link) == fl) { afs_lock_work()
253 static int afs_do_setlk(struct file *file, struct file_lock *fl) afs_do_setlk()
441 static int afs_do_unlk(struct file *file, struct file_lock *fl) afs_do_unlk()
476 static int afs_do_getlk(struct file *file, struct file_lock *fl) afs_do_getlk()
516 int afs_lock(struct file *file, int cmd, struct file_lock *fl) afs_lock()
539 int afs_flock(struct file *file, int cmd, struct file_lock *fl) afs_flock()
569 static void afs_fl_copy_lock(struct file_lock *new, struct file_lock *fl) afs_fl_copy_lock()
580 static void afs_fl_release_private(struct file_lock *fl) afs_fl_release_private()
H A Dinternal.h509 extern int afs_lock(struct file *, int, struct file_lock *);
510 extern int afs_flock(struct file *, int, struct file_lock *);
/linux-4.1.27/fs/dlm/
H A Dplock.c33 int (*callback)(struct file_lock *fl, int result);
36 struct file_lock flc;
81 struct file *file, struct file_lock *fl) do_unlock_close()
105 int cmd, struct file_lock *fl) dlm_posix_lock()
191 struct file_lock *fl; dlm_plock_callback()
192 struct file_lock *flc; dlm_plock_callback()
193 int (*notify)(struct file_lock *fl, int result) = NULL; dlm_plock_callback()
245 struct file_lock *fl) dlm_posix_unlock()
319 struct file_lock *fl) dlm_posix_get()
/linux-4.1.27/fs/ceph/
H A Dlocks.c36 int cmd, u8 wait, struct file_lock *fl) ceph_lock_message()
157 int ceph_lock(struct file *file, int cmd, struct file_lock *fl) ceph_lock()
204 int ceph_flock(struct file *file, int cmd, struct file_lock *fl) ceph_flock()
248 struct file_lock *lock; ceph_count_locks()
276 struct file_lock *lock; ceph_encode_locks_to_buffer()
355 int lock_to_ceph_filelock(struct file_lock *lock, lock_to_ceph_filelock()
H A Dsuper.h930 extern int ceph_lock(struct file *file, int cmd, struct file_lock *fl);
931 extern int ceph_flock(struct file *file, int cmd, struct file_lock *fl);
940 extern int lock_to_ceph_filelock(struct file_lock *fl, struct ceph_filelock *c);
/linux-4.1.27/fs/proc/
H A Dfd.c36 spin_lock(&files->file_lock); seq_show()
48 spin_unlock(&files->file_lock); seq_show()
164 spin_lock(&files->file_lock); proc_fd_link()
171 spin_unlock(&files->file_lock); proc_fd_link()
/linux-4.1.27/fs/nfs/
H A Ddelegation.h58 int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state, const nfs4_stateid *stateid);
H A Dfile.c731 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) do_getlk()
759 static int do_vfs_lock(struct file *file, struct file_lock *fl) do_vfs_lock()
776 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) do_unlk()
817 do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) do_setlk()
862 int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) nfs_lock()
901 int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) nfs_flock()
H A Dnfs4_fs.h196 int (*recover_lock)(struct nfs4_state *, struct file_lock *);
439 extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl);
H A Dinternal.h353 int nfs_lock(struct file *, int, struct file_lock *);
354 int nfs_flock(struct file *, int, struct file_lock *);
H A Dnfs4trace.h509 const struct file_lock *request,
559 const struct file_lock *request, \
H A Dproc.c637 nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) nfs_proc_lock()
646 static int nfs_lock_check_bounds(const struct file_lock *fl) nfs_lock_check_bounds()
H A Dnfs4state.c909 static void nfs4_fl_copy_lock(struct file_lock *dst, struct file_lock *src) nfs4_fl_copy_lock()
917 static void nfs4_fl_release_lock(struct file_lock *fl) nfs4_fl_release_lock()
927 int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl) nfs4_set_lock_state()
1388 struct file_lock *fl; nfs4_reclaim_locks()
H A Dnfs4proc.c5314 static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request) _nfs4_proc_getlk()
5356 static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request) nfs4_proc_getlk()
5370 static int do_vfs_lock(struct inode *inode, struct file_lock *fl) do_vfs_lock()
5391 struct file_lock fl;
5396 static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl, nfs4_alloc_unlockdata()
5488 static struct rpc_task *nfs4_do_unlck(struct file_lock *fl, nfs4_do_unlck()
5527 static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock *request) nfs4_proc_unlck()
5581 struct file_lock fl;
5588 static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, nfs4_alloc_lockdata()
5759 static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *fl, int recovery_type) _nfs4_do_setlk()
5810 static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request) nfs4_lock_reclaim()
5831 static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) nfs4_lock_expired()
5903 static int nfs41_lock_expired(struct nfs4_state *state, struct file_lock *request) nfs41_lock_expired()
5915 static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) _nfs4_proc_setlk()
5948 static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) nfs4_proc_setlk()
5968 nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request) nfs4_proc_lock()
6025 int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state, const nfs4_stateid *stateid) nfs4_lock_delegation_recall()
H A Dwrite.c1178 is_whole_file_wrlock(struct file_lock *fl) is_whole_file_wrlock()
1196 struct file_lock *fl; nfs_can_extend_write()
1212 fl = list_first_entry(&flctx->flc_posix, struct file_lock, nfs_can_extend_write()
1217 fl = list_first_entry(&flctx->flc_flock, struct file_lock, nfs_can_extend_write()
H A Ddelegation.c87 struct file_lock *fl; nfs_delegation_claim_locks()
H A Dnfs3proc.c869 nfs3_proc_lock(struct file *filp, int cmd, struct file_lock *fl) nfs3_proc_lock()
H A Dnfs4xdr.c1264 static inline int nfs4_lock_type(struct file_lock *fl, int block) nfs4_lock_type()
1271 static inline uint64_t nfs4_lock_length(struct file_lock *fl) nfs4_lock_length()
4818 static int decode_lock_denied (struct xdr_stream *xdr, struct file_lock *fl) decode_lock_denied()
/linux-4.1.27/fs/nfsd/
H A Dnfs4state.c3604 nfsd_break_deleg_cb(struct file_lock *fl) nfsd_break_deleg_cb()
3641 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, nfsd_change_deleg_cb()
3980 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_file *fp, int flag) nfs4_alloc_init_lease()
3982 struct file_lock *fl; nfs4_alloc_init_lease()
4011 struct file_lock *fl, *ret; nfs4_setlease()
5155 nfs4_transform_lock_offset(struct file_lock *lock) nfs4_transform_lock_offset()
5187 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) nfs4_set_lock_denied()
5445 struct file_lock *file_lock = NULL; nfsd4_lock() local
5446 struct file_lock *conflock = NULL; nfsd4_lock()
5517 file_lock = locks_alloc_lock(); nfsd4_lock()
5518 if (!file_lock) { nfsd4_lock()
5533 file_lock->fl_type = F_RDLCK; nfsd4_lock()
5542 file_lock->fl_type = F_WRLCK; nfsd4_lock()
5553 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); nfsd4_lock()
5554 file_lock->fl_pid = current->tgid; nfsd4_lock()
5555 file_lock->fl_file = filp; nfsd4_lock()
5556 file_lock->fl_flags = FL_POSIX; nfsd4_lock()
5557 file_lock->fl_lmops = &nfsd_posix_mng_ops; nfsd4_lock()
5558 file_lock->fl_start = lock->lk_offset; nfsd4_lock()
5559 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length); nfsd4_lock()
5560 nfs4_transform_lock_offset(file_lock); nfsd4_lock()
5569 err = vfs_lock_file(filp, F_SETLK, file_lock, conflock); nfsd4_lock()
5614 if (file_lock) nfsd4_lock()
5615 locks_free_lock(file_lock); nfsd4_lock()
5627 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) nfsd_test_lock()
5645 struct file_lock *file_lock = NULL; nfsd4_lockt() local
5665 file_lock = locks_alloc_lock(); nfsd4_lockt()
5666 if (!file_lock) { nfsd4_lockt()
5675 file_lock->fl_type = F_RDLCK; nfsd4_lockt()
5679 file_lock->fl_type = F_WRLCK; nfsd4_lockt()
5690 file_lock->fl_owner = (fl_owner_t)lo; nfsd4_lockt()
5691 file_lock->fl_pid = current->tgid; nfsd4_lockt()
5692 file_lock->fl_flags = FL_POSIX; nfsd4_lockt()
5694 file_lock->fl_start = lockt->lt_offset; nfsd4_lockt()
5695 file_lock->fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); nfsd4_lockt()
5697 nfs4_transform_lock_offset(file_lock); nfsd4_lockt()
5699 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); nfsd4_lockt()
5703 if (file_lock->fl_type != F_UNLCK) { nfsd4_lockt()
5705 nfs4_set_lock_denied(file_lock, &lockt->lt_denied); nfsd4_lockt()
5710 if (file_lock) nfsd4_lockt()
5711 locks_free_lock(file_lock); nfsd4_lockt()
5721 struct file_lock *file_lock = NULL; nfsd4_locku() local
5743 file_lock = locks_alloc_lock(); nfsd4_locku()
5744 if (!file_lock) { nfsd4_locku()
5750 file_lock->fl_type = F_UNLCK; nfsd4_locku()
5751 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(stp->st_stateowner)); nfsd4_locku()
5752 file_lock->fl_pid = current->tgid; nfsd4_locku()
5753 file_lock->fl_file = filp; nfsd4_locku()
5754 file_lock->fl_flags = FL_POSIX; nfsd4_locku()
5755 file_lock->fl_lmops = &nfsd_posix_mng_ops; nfsd4_locku()
5756 file_lock->fl_start = locku->lu_offset; nfsd4_locku()
5758 file_lock->fl_end = last_byte_offset(locku->lu_offset, nfsd4_locku()
5760 nfs4_transform_lock_offset(file_lock); nfsd4_locku()
5762 err = vfs_lock_file(filp, F_SETLK, file_lock, NULL); nfsd4_locku()
5776 if (file_lock) nfsd4_locku()
5777 locks_free_lock(file_lock); nfsd4_locku()
5793 struct file_lock *fl; check_for_locks()
H A Dnfs4layouts.c159 struct file_lock *fl; nfsd4_layout_setlease()
662 nfsd4_layout_lm_break(struct file_lock *fl) nfsd4_layout_lm_break()
675 nfsd4_layout_lm_change(struct file_lock *onlist, int arg, nfsd4_layout_lm_change()
/linux-4.1.27/drivers/misc/genwqe/
H A Dcard_dev.c45 spin_lock_irqsave(&cd->file_lock, flags); genwqe_open_files()
47 spin_unlock_irqrestore(&cd->file_lock, flags); genwqe_open_files()
56 spin_lock_irqsave(&cd->file_lock, flags); genwqe_add_file()
58 spin_unlock_irqrestore(&cd->file_lock, flags); genwqe_add_file()
65 spin_lock_irqsave(&cd->file_lock, flags); genwqe_del_file()
67 spin_unlock_irqrestore(&cd->file_lock, flags); genwqe_del_file()
268 spin_lock_irqsave(&cd->file_lock, flags); genwqe_kill_fasync()
274 spin_unlock_irqrestore(&cd->file_lock, flags); genwqe_kill_fasync()
284 spin_lock_irqsave(&cd->file_lock, flags); genwqe_force_sig()
289 spin_unlock_irqrestore(&cd->file_lock, flags); genwqe_force_sig()
H A Dcard_base.h267 * @file_lock: Lock to protect access to file_list
322 spinlock_t file_lock; /* lock for open files */ member in struct:genwqe_dev
H A Dcard_base.c150 spin_lock_init(&cd->file_lock); genwqe_dev_alloc()
/linux-4.1.27/fs/9p/
H A Dvfs_file.c131 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) v9fs_file_lock()
150 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) v9fs_file_do_lock()
241 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) v9fs_file_getlock()
304 static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl) v9fs_file_lock_dotl()
340 struct file_lock *fl) v9fs_file_flock_dotl()
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
H A Dfile.c2680 ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ll_file_flock() argument
2687 .ei_cbdata = file_lock, ll_file_flock()
2696 CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu file_lock=%p\n", ll_file_flock()
2697 inode->i_ino, file_lock); ll_file_flock()
2701 if (file_lock->fl_flags & FL_FLOCK) ll_file_flock()
2703 else if (!(file_lock->fl_flags & FL_POSIX)) ll_file_flock()
2706 flock.l_flock.owner = (unsigned long)file_lock->fl_owner; ll_file_flock()
2707 flock.l_flock.pid = file_lock->fl_pid; ll_file_flock()
2708 flock.l_flock.start = file_lock->fl_start; ll_file_flock()
2709 flock.l_flock.end = file_lock->fl_end; ll_file_flock()
2718 if (file_lock->fl_lmops && file_lock->fl_lmops->lm_compare_owner) ll_file_flock()
2719 flock.l_flock.owner = (unsigned long)file_lock->fl_pid; ll_file_flock()
2721 switch (file_lock->fl_type) { ll_file_flock()
2741 file_lock->fl_type); ll_file_flock()
2765 file_lock->fl_type = einfo.ei_mode; ll_file_flock()
2784 if ((file_lock->fl_flags & FL_FLOCK) && ll_file_flock()
2785 (rc == 0 || file_lock->fl_type == F_UNLCK)) ll_file_flock()
2786 rc2 = flock_lock_file_wait(file, file_lock); ll_file_flock()
2787 if ((file_lock->fl_flags & FL_POSIX) && ll_file_flock()
2788 (rc == 0 || file_lock->fl_type == F_UNLCK) && ll_file_flock()
2790 rc2 = posix_lock_file_wait(file, file_lock); ll_file_flock()
2792 if (rc2 && file_lock->fl_type != F_UNLCK) { ll_file_flock()
2805 ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock) ll_file_noflock() argument
/linux-4.1.27/security/apparmor/
H A Daudit.c43 "file_lock",
H A Dlsm.c645 .file_lock = apparmor_file_lock,
/linux-4.1.27/fs/gfs2/
H A Dfile.c985 static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) gfs2_lock()
1014 static int do_flock(struct file *file, int cmd, struct file_lock *fl) do_flock()
1035 &(struct file_lock){.fl_type = F_UNLCK}); do_flock()
1068 static void do_unflock(struct file *file, struct file_lock *fl) do_unflock()
1091 static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) gfs2_flock()
/linux-4.1.27/fs/cifs/
H A Dcifsfs.h98 extern int cifs_lock(struct file *, int, struct file_lock *);
H A Dsmb2file.c91 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, smb2_unlock_range()
H A Dsmb2proto.h96 struct file_lock *flock, const unsigned int xid);
H A Dfile.c897 __u8 type, struct file_lock *flock) cifs_lock_test()
990 cifs_posix_lock_test(struct file *file, struct file_lock *flock) cifs_posix_lock_test()
1018 cifs_posix_lock_set(struct file *file, struct file_lock *flock) cifs_posix_lock_set()
1129 struct file_lock *flock; cifs_push_posix_locks()
1240 cifs_read_flock(struct file_lock *flock, __u32 *type, int *lock, int *unlock, cifs_read_flock()
1287 cifs_getlk(struct file *file, struct file_lock *flock, __u32 type, cifs_getlk()
1374 cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, cifs_unlock_range()
1481 cifs_setlk(struct file *file, struct file_lock *flock, __u32 type, cifs_setlk()
1560 int cifs_lock(struct file *file, int cmd, struct file_lock *flock) cifs_lock()
H A Dcifsproto.h140 struct file_lock *flock, const unsigned int xid);
419 struct file_lock *, const __u16 lock_type,
H A Dcifsfs.c818 cifs_setlease(struct file *file, long arg, struct file_lock **lease, void **priv) cifs_setlease()
H A Dcifsglob.h359 int (*mand_unlock_range)(struct cifsFileInfo *, struct file_lock *,
H A Dcifssmb.c2396 struct file_lock *pLockData, const __u16 lock_type, CIFSSMBPosixLock()
/linux-4.1.27/fs/fuse/
H A Dfile.c2072 struct file_lock *fl) convert_fuse_file_lock()
2097 const struct file_lock *fl, int opcode, pid_t pid, fuse_lk_fill()
2120 static int fuse_getlk(struct file *file, struct file_lock *fl) fuse_getlk()
2140 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) fuse_setlk()
2169 static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) fuse_file_lock()
2192 static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl) fuse_file_flock()
/linux-4.1.27/security/
H A Dcapability.c1031 set_to_cap_if_null(ops, file_lock); security_fixup_ops()
H A Dsecurity.c792 return security_ops->file_lock(file, cmd); security_file_lock()
/linux-4.1.27/drivers/staging/lustre/lustre/ldlm/
H A Dldlm_flock.c586 struct file_lock *getlk = lock->l_ast_data; ldlm_flock_completion_ast()
/linux-4.1.27/security/smack/
H A Dsmack_lsm.c4307 .file_lock = smack_file_lock,
/linux-4.1.27/security/selinux/
H A Dhooks.c5918 .file_lock = selinux_file_lock,

Completed in 1160 milliseconds