/linux-6.3-rc2/fs/ |
A D | fcntl.c | 320 struct flock flock; in do_fcntl() local 348 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 351 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl() 362 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 469 struct flock64 flock; in SYSCALL_DEFINE3() local 488 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3() 491 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3() 499 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3() 593 static int fixup_compat_flock(struct flock *flock) in fixup_compat_flock() argument 598 flock->l_len = COMPAT_OFF_T_MAX; in fixup_compat_flock() [all …]
|
A D | locks.c | 506 struct flock *l) in flock_to_posix_lock() 2165 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument 2181 flock->l_whence = 0; in posix_lock_to_flock() 2193 flock->l_whence = 0; in posix_lock_to_flock64() 2201 int fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock) in fcntl_getlk() argument 2210 if (flock->l_type != F_RDLCK && flock->l_type != F_WRLCK) in fcntl_getlk() 2219 if (flock->l_pid != 0) in fcntl_getlk() 2327 struct flock *flock) in fcntl_setlk() argument 2352 if (flock->l_pid != 0) in fcntl_setlk() 2417 if (flock->l_type != F_RDLCK && flock->l_type != F_WRLCK) in fcntl_getlk64() [all …]
|
/linux-6.3-rc2/fs/9p/ |
A D | vfs_file.c | 134 struct p9_flock flock; in v9fs_file_do_lock() local 151 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock() 155 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock() 164 flock.start = fl->fl_start; in v9fs_file_do_lock() 166 flock.length = 0; in v9fs_file_do_lock() 169 flock.proc_id = fl->fl_pid; in v9fs_file_do_lock() 197 kfree(flock.client_id); in v9fs_file_do_lock() 232 kfree(flock.client_id); in v9fs_file_do_lock() 653 .flock = v9fs_file_flock_dotl, 680 .flock = v9fs_file_flock_dotl, [all …]
|
/linux-6.3-rc2/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-6.3-rc2/fs/cifs/ |
A D | file.c | 1325 flock->fl_type = F_UNLCK; in cifs_lock_test() 1544 struct file_lock *flock; in cifs_push_posix_locks() local 1591 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK) in cifs_push_posix_locks() 1675 if (flock->fl_flags & in cifs_read_flock() 1731 flock->fl_start, length, flock, in cifs_getlk() 1737 rc = cifs_lock_test(cfile, flock->fl_start, length, type, flock); in cifs_getlk() 1747 flock->fl_type = F_UNLCK; in cifs_getlk() 1755 flock->fl_type = F_WRLCK; in cifs_getlk() 1767 flock->fl_type = F_RDLCK; in cifs_getlk() 1989 if ((flock->fl_flags & FL_POSIX) || (flock->fl_flags & FL_FLOCK)) { in cifs_setlk() [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() 222 if (flock->fl_start > li->offset || in smb2_unlock_range() 223 (flock->fl_start + length) < in smb2_unlock_range() 231 if (!(flock->fl_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
|
/linux-6.3-rc2/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-6.3-rc2/arch/arm/kernel/ |
A D | sys_oabi-compat.c | 237 struct flock64 flock; in sys_oabi_fcntl64() local 249 err = get_oabi_flock(&flock, argp); in sys_oabi_fcntl64() 252 err = fcntl_getlk64(f.file, cmd, &flock); in sys_oabi_fcntl64() 254 err = put_oabi_flock(&flock, argp); in sys_oabi_fcntl64() 263 err = get_oabi_flock(&flock, argp); in sys_oabi_fcntl64() 266 err = fcntl_setlk64(fd, f.file, cmd, &flock); in sys_oabi_fcntl64()
|
/linux-6.3-rc2/fs/ksmbd/ |
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 | 324 struct file_lock *flock; in check_lock_range() local 332 list_for_each_entry(flock, &ctx->flc_posix, fl_list) { in check_lock_range() 334 if (flock->fl_end >= start && end >= flock->fl_start) { in check_lock_range() 335 if (flock->fl_type == F_RDLCK) { in check_lock_range() 341 } else if (flock->fl_type == F_WRLCK) { in check_lock_range() 343 if (flock->fl_file != filp) { in check_lock_range() 1810 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock) in ksmbd_vfs_posix_lock_wait() argument 1812 wait_event(flock->fl_wait, !flock->fl_blocker); in ksmbd_vfs_posix_lock_wait() 1817 return wait_event_interruptible_timeout(flock->fl_wait, in ksmbd_vfs_posix_lock_wait_timeout() 1818 !flock->fl_blocker, in ksmbd_vfs_posix_lock_wait_timeout() [all …]
|
A D | smb2pdu.c | 6754 lock->fl = flock; in smb2_lock_init() 6773 wake_up(&flock->fl_wait); in smb2_remove_blocked_lock() 6830 if (!flock) in smb2_lock() 6840 locks_free_lock(flock); in smb2_lock() 6853 flock->fl_end = flock->fl_start + lock_length; in smb2_lock() 6855 if (flock->fl_end < flock->fl_start) { in smb2_lock() 6858 flock->fl_end, flock->fl_start); in smb2_lock() 6860 locks_free_lock(flock); in smb2_lock() 6881 locks_free_lock(flock); in smb2_lock() 6993 flock = smb_lock->fl; in smb2_lock() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | filelock.h | 137 int fcntl_getlk(struct file *, unsigned int, struct flock *); 139 struct flock *); 192 struct flock __user *user) in fcntl_getlk() 198 unsigned int cmd, struct flock __user *user) in fcntl_setlk()
|
/linux-6.3-rc2/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-6.3-rc2/drivers/nvme/target/ |
A D | fc.c | 85 spinlock_t flock; member 642 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist() 898 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue() 907 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 911 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 2303 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 2346 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 2358 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 2449 spin_lock_irqsave(&fod->flock, flags); in __nvmet_fc_fcp_nvme_cmd_done() 2775 spin_lock(&fod->flock); in nvmet_fc_rcv_fcp_abort() [all …]
|
/linux-6.3-rc2/fs/afs/ |
A D | Makefile | 16 flock.o \
|
/linux-6.3-rc2/tools/perf/trace/beauty/ |
A D | Build | 3 perf-y += flock.o
|
/linux-6.3-rc2/net/9p/ |
A D | client.c | 2179 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument 2189 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl() 2190 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl() 2192 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl() 2193 flock->flags, flock->start, flock->length, in p9_client_lock_dotl() 2194 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
|
/linux-6.3-rc2/include/uapi/asm-generic/ |
A D | fcntl.h | 196 struct flock { struct
|
/linux-6.3-rc2/tools/include/uapi/asm-generic/ |
A D | fcntl.h | 196 struct flock { struct
|
/linux-6.3-rc2/tools/power/x86/intel-speed-select/ |
A D | isst-daemon.c | 197 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
|
/linux-6.3-rc2/arch/um/os-Linux/ |
A D | file.c | 580 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
|
/linux-6.3-rc2/include/net/9p/ |
A D | client.h | 224 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
/linux-6.3-rc2/Documentation/x86/ |
A D | resctrl.rst | 1134 Locking is based on flock, which is available in libc and also as a shell 1139 A) Take flock(LOCK_EX) on /sys/fs/resctrl 1145 A) Take flock(LOCK_SH) on /sys/fs/resctrl 1152 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl 1162 $ flock /sys/fs/resctrl/ ./create-dir.sh 1178 ret = flock(fd, LOCK_SH); 1180 perror("flock"); 1190 ret = flock(fd, LOCK_EX); 1192 perror("flock"); 1202 ret = flock(fd, LOCK_UN); [all …]
|
/linux-6.3-rc2/tools/perf/util/ |
A D | bpf_counter.c | 372 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map() 586 flock(attr_map_fd, LOCK_UN); in bperf__load()
|
/linux-6.3-rc2/kernel/ |
A D | sys_ni.c | 88 COND_SYSCALL(flock);
|