| /linux/fs/ |
| A D | fcntl.c | 446 struct flock flock; in do_fcntl() local 480 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 483 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl() 494 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 600 struct flock64 flock; in SYSCALL_DEFINE3() local 619 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3() 622 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3() 630 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3() 724 static int fixup_compat_flock(struct flock *flock) in fixup_compat_flock() argument 729 flock->l_len = COMPAT_OFF_T_MAX; in fixup_compat_flock() [all …]
|
| A D | locks.c | 542 struct flock *l) in flock_to_posix_lock() 2242 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument 2258 flock->l_whence = 0; in posix_lock_to_flock() 2270 flock->l_whence = 0; in posix_lock_to_flock64() 2278 int fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock) in fcntl_getlk() argument 2297 if (flock->l_pid != 0) in fcntl_getlk() 2407 struct flock *flock) in fcntl_setlk() argument 2432 if (flock->l_pid != 0) in fcntl_setlk() 2441 if (flock->l_pid != 0) in fcntl_setlk() 2506 if (flock->l_pid != 0) in fcntl_getlk64() [all …]
|
| /linux/fs/9p/ |
| A D | vfs_file.c | 120 struct p9_flock flock; in v9fs_file_do_lock() local 136 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock() 140 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock() 143 flock.type = P9_LOCK_TYPE_WRLCK; in v9fs_file_do_lock() 146 flock.type = P9_LOCK_TYPE_UNLCK; in v9fs_file_do_lock() 149 flock.start = fl->fl_start; in v9fs_file_do_lock() 151 flock.length = 0; in v9fs_file_do_lock() 154 flock.proc_id = fl->c.flc_pid; in v9fs_file_do_lock() 182 kfree(flock.client_id); in v9fs_file_do_lock() 218 kfree(flock.client_id); in v9fs_file_do_lock() [all …]
|
| /linux/fs/smb/client/ |
| A D | file.c | 1605 flock->c.flc_type = F_UNLCK; in cifs_lock_test() 1687 posix_test_lock(file, flock); in cifs_posix_lock_test() 1824 struct file_lock *flock; in cifs_push_posix_locks() local 1957 if (flock->c.flc_flags & in cifs_read_flock() 1964 if (lock_is_write(flock)) { in cifs_read_flock() 2014 flock->fl_start, length, flock, in cifs_getlk() 2020 rc = cifs_lock_test(cfile, flock->fl_start, length, type, flock); in cifs_getlk() 2030 flock->c.flc_type = F_UNLCK; in cifs_getlk() 2270 if ((flock->c.flc_flags & FL_POSIX) || (flock->c.flc_flags & FL_FLOCK)) { in cifs_setlk() 2351 flock->c.flc_flags, flock->c.flc_type, in cifs_lock() [all …]
|
| A D | smb2file.c | 189 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument 198 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range() 220 if (flock->fl_start > li->offset || in smb2_unlock_range() 221 (flock->fl_start + length) < in smb2_unlock_range() 229 if (!(flock->c.flc_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
|
| /linux/Documentation/filesystems/ |
| A D | locks.rst | 18 The old flock(2) emulation in the kernel was swapped for proper BSD 19 compatible flock(2) support in the 1.3.x series of kernels. With the 33 Because sendmail was unable to use the old flock() emulation, many sendmail 34 installations use fcntl() instead of flock(). This is true of Slackware 3.0 38 file with flock(). With pre 1.3.96 kernels this could result in deadlocks that, 46 is to make flock() and fcntl() locks oblivious to each other. Both can 53 cooperative flock()/fcntl() are those that emulate flock() using
|
| /linux/tools/testing/selftests/filelock/ |
| A D | ofdlocks.c | 11 static int lock_set(int fd, struct flock *fl) in lock_set() 23 static int lock_get(int fd, struct flock *fl) in lock_get() 38 struct flock fl, fl2; in main()
|
| /linux/tools/testing/selftests/powerpc/nx-gzip/include/ |
| A D | nx_dbg.h | 34 flock(nx_gzip_log->_fileno, LOCK_EX); \ 42 flock(nx_gzip_log->_fileno, LOCK_UN); \
|
| /linux/arch/arm/kernel/ |
| A D | sys_oabi-compat.c | 239 struct flock64 flock; in sys_oabi_fcntl64() local 251 err = get_oabi_flock(&flock, argp); in sys_oabi_fcntl64() 254 err = fcntl_getlk64(fd_file(f), cmd, &flock); in sys_oabi_fcntl64() 256 err = put_oabi_flock(&flock, argp); in sys_oabi_fcntl64() 265 err = get_oabi_flock(&flock, argp); in sys_oabi_fcntl64() 268 err = fcntl_setlk64(fd, fd_file(f), cmd, &flock); in sys_oabi_fcntl64()
|
| /linux/fs/smb/server/ |
| A D | vfs.h | 141 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock); 142 int ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout); 143 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock);
|
| A D | vfs.c | 332 struct file_lock *flock; in check_lock_range() local 340 for_each_file_lock(flock, &ctx->flc_posix) { in check_lock_range() 342 if (flock->fl_end >= start && end >= flock->fl_start) { in check_lock_range() 343 if (lock_is_read(flock)) { in check_lock_range() 349 } else if (lock_is_write(flock)) { in check_lock_range() 351 if (flock->c.flc_file != filp) { in check_lock_range() 1853 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock) in ksmbd_vfs_posix_lock_wait() argument 1855 wait_event(flock->c.flc_wait, !flock->c.flc_blocker); in ksmbd_vfs_posix_lock_wait() 1861 !flock->c.flc_blocker, in ksmbd_vfs_posix_lock_wait_timeout() 1865 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock) in ksmbd_vfs_posix_lock_unblock() argument [all …]
|
| A D | smb2pdu.c | 7153 lock->fl = flock; in smb2_lock_init() 7172 locks_wake_up(flock); in smb2_remove_blocked_lock() 7231 if (!flock) in smb2_lock() 7241 locks_free_lock(flock); in smb2_lock() 7254 flock->fl_end = flock->fl_start + lock_length; in smb2_lock() 7256 if (flock->fl_end < flock->fl_start) { in smb2_lock() 7259 flock->fl_end, flock->fl_start); in smb2_lock() 7261 locks_free_lock(flock); in smb2_lock() 7282 locks_free_lock(flock); in smb2_lock() 7394 flock = smb_lock->fl; in smb2_lock() [all …]
|
| /linux/tools/testing/selftests/wireguard/qemu/ |
| A D | Makefile | 37 …flock -x $$@.lock -c '[ -f $$@ ] && exit 0; wget -O $$@.tmp $(MIRROR)$(1) || wget -O $$@.tmp $(2)$… 354 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 364 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 377 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 391 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 401 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 411 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 426 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 437 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
|
| /linux/include/linux/ |
| A D | filelock.h | 150 int fcntl_getlk(struct file *, unsigned int, struct flock *); 152 struct flock *); 230 struct flock __user *user) in fcntl_getlk() 236 unsigned int cmd, struct flock __user *user) in fcntl_setlk()
|
| /linux/drivers/nvme/target/ |
| A D | fc.c | 85 spinlock_t flock; member 650 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist() 897 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue() 906 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 910 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 2319 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 2362 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 2374 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 2465 spin_lock_irqsave(&fod->flock, flags); in __nvmet_fc_fcp_nvme_cmd_done() 2792 spin_lock(&fod->flock); in nvmet_fc_rcv_fcp_abort() [all …]
|
| /linux/fs/afs/ |
| A D | Makefile | 17 flock.o \
|
| /linux/net/9p/ |
| A D | client.c | 2223 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument 2232 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl() 2233 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl() 2235 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl() 2236 flock->flags, flock->start, flock->length, in p9_client_lock_dotl() 2237 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
|
| /linux/tools/perf/trace/beauty/ |
| A D | Build | 3 perf-y += flock.o
|
| /linux/include/uapi/asm-generic/ |
| A D | fcntl.h | 195 struct flock { struct
|
| /linux/tools/power/x86/intel-speed-select/ |
| A D | isst-daemon.c | 212 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
|
| /linux/include/net/9p/ |
| A D | client.h | 226 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
| /linux/arch/um/os-Linux/ |
| A D | file.c | 598 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
|
| /linux/tools/perf/util/ |
| A D | bpf_counter.c | 357 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map() 571 flock(attr_map_fd, LOCK_UN); in bperf__load()
|
| /linux/Documentation/arch/x86/ |
| A D | resctrl.rst | 1200 Locking is based on flock, which is available in libc and also as a shell 1205 A) Take flock(LOCK_EX) on /sys/fs/resctrl 1211 A) Take flock(LOCK_SH) on /sys/fs/resctrl 1218 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl 1228 $ flock /sys/fs/resctrl/ ./create-dir.sh 1244 ret = flock(fd, LOCK_SH); 1246 perror("flock"); 1256 ret = flock(fd, LOCK_EX); 1258 perror("flock"); 1268 ret = flock(fd, LOCK_UN); [all …]
|
| /linux/kernel/ |
| A D | sys_ni.c | 66 COND_SYSCALL(flock);
|