• Home
  • Raw
  • Download

Lines Matching refs:file_lock

149 static struct file_lock *locks_alloc_lock(void)  in locks_alloc_lock()
154 static void locks_release_private(struct file_lock *fl) in locks_release_private()
170 static void locks_free_lock(struct file_lock *fl) in locks_free_lock()
180 void locks_init_lock(struct file_lock *fl) in locks_init_lock()
206 struct file_lock *lock = (struct file_lock *) foo; in init_once()
211 static void locks_copy_private(struct file_lock *new, struct file_lock *fl) in locks_copy_private()
228 void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl) in __locks_copy_lock()
242 void locks_copy_lock(struct file_lock *new, struct file_lock *fl) in locks_copy_lock()
271 static int flock_make_lock(struct file *filp, struct file_lock **lock, in flock_make_lock()
274 struct file_lock *fl; in flock_make_lock()
293 static int assign_type(struct file_lock *fl, int type) in assign_type()
310 static int flock_to_posix_lock(struct file *filp, struct file_lock *fl, in flock_to_posix_lock()
360 static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, in flock64_to_posix_lock()
417 static void lease_break_callback(struct file_lock *fl) in lease_break_callback()
422 static void lease_release_private_callback(struct file_lock *fl) in lease_release_private_callback()
431 static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try) in lease_mylease_callback()
446 static int lease_init(struct file *filp, int type, struct file_lock *fl) in lease_init()
464 static struct file_lock *lease_alloc(struct file *filp, int type) in lease_alloc()
466 struct file_lock *fl = locks_alloc_lock(); in lease_alloc()
482 static inline int locks_overlap(struct file_lock *fl1, struct file_lock *fl2) in locks_overlap()
491 static int posix_same_owner(struct file_lock *fl1, struct file_lock *fl2) in posix_same_owner()
502 static void __locks_delete_block(struct file_lock *waiter) in __locks_delete_block()
511 static void locks_delete_block(struct file_lock *waiter) in locks_delete_block()
523 static void locks_insert_block(struct file_lock *blocker, in locks_insert_block()
524 struct file_lock *waiter) in locks_insert_block()
537 static void locks_wake_up_blocks(struct file_lock *blocker) in locks_wake_up_blocks()
540 struct file_lock *waiter; in locks_wake_up_blocks()
543 struct file_lock, fl_block); in locks_wake_up_blocks()
555 static void locks_insert_lock(struct file_lock **pos, struct file_lock *fl) in locks_insert_lock()
572 static void locks_delete_lock(struct file_lock **thisfl_p) in locks_delete_lock()
574 struct file_lock *fl = *thisfl_p; in locks_delete_lock()
598 static int locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) in locks_conflict()
610 static int posix_locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) in posix_locks_conflict()
628 static int flock_locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) in flock_locks_conflict()
642 posix_test_lock(struct file *filp, struct file_lock *fl) in posix_test_lock()
644 struct file_lock *cfl; in posix_test_lock()
692 static struct file_lock *what_owner_is_waiting_for(struct file_lock *block_fl) in what_owner_is_waiting_for()
694 struct file_lock *fl; in what_owner_is_waiting_for()
703 static int posix_locks_deadlock(struct file_lock *caller_fl, in posix_locks_deadlock()
704 struct file_lock *block_fl) in posix_locks_deadlock()
724 static int flock_lock_file(struct file *filp, struct file_lock *request) in flock_lock_file()
726 struct file_lock *new_fl = NULL; in flock_lock_file()
727 struct file_lock **before; in flock_lock_file()
745 struct file_lock *fl = *before; in flock_lock_file()
774 struct file_lock *fl = *before; in flock_lock_file()
802 static int __posix_lock_file(struct inode *inode, struct file_lock *request, struct file_lock *conf… in __posix_lock_file()
804 struct file_lock *fl; in __posix_lock_file()
805 struct file_lock *new_fl = NULL; in __posix_lock_file()
806 struct file_lock *new_fl2 = NULL; in __posix_lock_file()
807 struct file_lock *left = NULL; in __posix_lock_file()
808 struct file_lock *right = NULL; in __posix_lock_file()
809 struct file_lock **before; in __posix_lock_file()
1018 int posix_lock_file(struct file *filp, struct file_lock *fl, in posix_lock_file()
1019 struct file_lock *conflock) in posix_lock_file()
1034 int posix_lock_file_wait(struct file *filp, struct file_lock *fl) in posix_lock_file_wait()
1063 struct file_lock *fl; in locks_mandatory_locked()
1096 struct file_lock fl; in locks_mandatory_area()
1134 int lease_modify(struct file_lock **before, int arg) in lease_modify()
1136 struct file_lock *fl = *before; in lease_modify()
1151 struct file_lock **before; in time_out_leases()
1152 struct file_lock *fl; in time_out_leases()
1180 struct file_lock *new_fl, *flock; in __break_lease()
1181 struct file_lock *fl; in __break_lease()
1283 struct file_lock *flock = inode->i_flock; in lease_get_mtime()
1317 struct file_lock *fl; in fcntl_getlease()
1344 int generic_setlease(struct file *filp, long arg, struct file_lock **flp) in generic_setlease()
1346 struct file_lock *fl, **before, **my_before = NULL, *lease; in generic_setlease()
1347 struct file_lock *new_fl = NULL; in generic_setlease()
1464 int vfs_setlease(struct file *filp, long arg, struct file_lock **lease) in vfs_setlease()
1491 struct file_lock fl, *flp = &fl; in fcntl_setlease()
1528 int flock_lock_file_wait(struct file *filp, struct file_lock *fl) in flock_lock_file_wait()
1570 struct file_lock *lock; in SYSCALL_DEFINE2()
1621 int vfs_test_lock(struct file *filp, struct file_lock *fl) in vfs_test_lock()
1630 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock()
1652 static void posix_lock_to_flock64(struct flock64 *flock, struct file_lock *fl) in posix_lock_to_flock64()
1668 struct file_lock file_lock; in fcntl_getlk() local
1679 error = flock_to_posix_lock(filp, &file_lock, &flock); in fcntl_getlk()
1683 error = vfs_test_lock(filp, &file_lock); in fcntl_getlk()
1687 flock.l_type = file_lock.fl_type; in fcntl_getlk()
1688 if (file_lock.fl_type != F_UNLCK) { in fcntl_getlk()
1689 error = posix_lock_to_flock(&flock, &file_lock); in fcntl_getlk()
1733 int vfs_lock_file(struct file *filp, unsigned int cmd, struct file_lock *fl, struct file_lock *conf) in vfs_lock_file()
1743 struct file_lock *fl) in do_lock_file_wait()
1772 struct file_lock *file_lock = locks_alloc_lock(); in fcntl_setlk() local
1778 if (file_lock == NULL) in fcntl_setlk()
1799 error = flock_to_posix_lock(filp, file_lock, &flock); in fcntl_setlk()
1803 file_lock->fl_flags |= FL_SLEEP; in fcntl_setlk()
1823 error = do_lock_file_wait(filp, cmd, file_lock); in fcntl_setlk()
1834 spin_lock(&current->files->file_lock); in fcntl_setlk()
1836 spin_unlock(&current->files->file_lock); in fcntl_setlk()
1843 locks_free_lock(file_lock); in fcntl_setlk()
1853 struct file_lock file_lock; in fcntl_getlk64() local
1864 error = flock64_to_posix_lock(filp, &file_lock, &flock); in fcntl_getlk64()
1868 error = vfs_test_lock(filp, &file_lock); in fcntl_getlk64()
1872 flock.l_type = file_lock.fl_type; in fcntl_getlk64()
1873 if (file_lock.fl_type != F_UNLCK) in fcntl_getlk64()
1874 posix_lock_to_flock64(&flock, &file_lock); in fcntl_getlk64()
1890 struct file_lock *file_lock = locks_alloc_lock(); in fcntl_setlk64() local
1896 if (file_lock == NULL) in fcntl_setlk64()
1917 error = flock64_to_posix_lock(filp, file_lock, &flock); in fcntl_setlk64()
1921 file_lock->fl_flags |= FL_SLEEP; in fcntl_setlk64()
1941 error = do_lock_file_wait(filp, cmd, file_lock); in fcntl_setlk64()
1947 spin_lock(&current->files->file_lock); in fcntl_setlk64()
1949 spin_unlock(&current->files->file_lock); in fcntl_setlk64()
1956 locks_free_lock(file_lock); in fcntl_setlk64()
1968 struct file_lock lock; in locks_remove_posix()
2002 struct file_lock *fl; in locks_remove_flock()
2003 struct file_lock **before; in locks_remove_flock()
2009 struct file_lock fl = { in locks_remove_flock()
2050 posix_unblock_lock(struct file *filp, struct file_lock *waiter) in posix_unblock_lock()
2072 int vfs_cancel_lock(struct file *filp, struct file_lock *fl) in vfs_cancel_lock()
2085 static void lock_get_status(struct seq_file *f, struct file_lock *fl, in lock_get_status()
2158 struct file_lock *fl, *bfl; in locks_show()
2160 fl = list_entry(v, struct file_lock, fl_link); in locks_show()
2230 struct file_lock *fl; in lock_may_read()
2270 struct file_lock *fl; in lock_may_write()
2296 sizeof(struct file_lock), 0, SLAB_PANIC, in filelock_init()