| /linux/fs/ |
| H A D | fcntl.c | 450 struct flock flock; in do_fcntl() local 484 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 486 err = fcntl_getlk(filp, cmd, &flock); in do_fcntl() 487 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl() 498 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 500 err = fcntl_setlk(fd, filp, cmd, &flock); in do_fcntl() 613 struct flock64 flock; in SYSCALL_DEFINE3() local 632 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3() 634 err = fcntl_getlk64(fd_file(f), cmd, &flock); in SYSCALL_DEFINE3() 635 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3() [all …]
|
| /linux/Documentation/filesystems/ |
| H 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
|
| H A D | ocfs2.rst | 90 localflocks This disables cluster aware flock.
|
| /linux/fs/smb/client/ |
| H A D | file.c | 1678 __u8 type, struct file_lock *flock) in cifs_lock_test() argument 1689 flock->c.flc_flags, &conf_lock, in cifs_lock_test() 1692 flock->fl_start = conf_lock->offset; in cifs_lock_test() 1693 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test() 1694 flock->c.flc_pid = conf_lock->pid; in cifs_lock_test() 1696 flock->c.flc_type = F_RDLCK; in cifs_lock_test() 1698 flock->c.flc_type = F_WRLCK; in cifs_lock_test() 1702 flock->c.flc_type = F_UNLCK; in cifs_lock_test() 1780 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument 1784 unsigned char saved_type = flock->c.flc_type; in cifs_posix_lock_test() [all …]
|
| H A D | smb2file.c | 268 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument 277 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range() 299 if (flock->fl_start > li->offset || in smb2_unlock_range() 300 (flock->fl_start + length) < in smb2_unlock_range() 308 if (!(flock->c.flc_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
|
| H A D | smb2proto.h | 112 int smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
|
| H A D | cifsfs.c | 1582 .flock = cifs_flock, 1602 .flock = cifs_flock, 1622 .flock = cifs_flock,
|
| /linux/tools/testing/selftests/filelock/ |
| H 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/arch/arm/kernel/ |
| H 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/tools/testing/selftests/powerpc/nx-gzip/include/ |
| H A D | nx_dbg.h | 34 flock(nx_gzip_log->_fileno, LOCK_EX); \ 42 flock(nx_gzip_log->_fileno, LOCK_UN); \
|
| /linux/tools/testing/selftests/wireguard/qemu/ |
| H A D | Makefile | 37 flock -x $$@.lock -c '[ -f $$@ ] && exit 0; wget -O $$@.tmp $(MIRROR)$(1) || wget -O $$@.tmp $(2)$(1) || rm -f $$@.tmp; [ -f $$@.tmp ] || exit 1; if ([ -n "$(4)" ] && sed -n "s#^\([a-f0-9]\{64\}\) \($(1)\)\$$$$#\1 $(DISTFILES_PATH)/\2.tmp#p" "$(4)" || echo "$(3) $$@.tmp") | sha256sum -c -; then mv $$@.tmp $$@; else rm -f $$@.tmp; exit 71; fi' 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 $< 412 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 427 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 438 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
|
| /linux/fs/smb/server/ |
| H A D | vfs.c | 299 struct file_lock *flock; in check_lock_range() local 310 for_each_file_lock(flock, &ctx->flc_posix) { in check_lock_range() 312 if (flock->fl_end >= start && end >= flock->fl_start) { in check_lock_range() 313 if (lock_is_read(flock)) { in check_lock_range() 319 } else if (lock_is_write(flock)) { in check_lock_range() 321 if (flock->c.flc_file != filp) { in check_lock_range() 1791 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock) in ksmbd_vfs_posix_lock_wait() argument 1793 wait_event(flock->c.flc_wait, !flock->c.flc_blocker); in ksmbd_vfs_posix_lock_wait() 1796 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock) in ksmbd_vfs_posix_lock_unblock() argument 1798 locks_delete_block(flock); in ksmbd_vfs_posix_lock_unblock()
|
| H A D | smb2pdu.c | 7382 static int smb2_set_flock_flags(struct file_lock *flock, int flags) in smb2_set_flock_flags() argument 7391 flock->c.flc_type = F_RDLCK; in smb2_set_flock_flags() 7392 flock->c.flc_flags |= FL_SLEEP; in smb2_set_flock_flags() 7397 flock->c.flc_type = F_WRLCK; in smb2_set_flock_flags() 7398 flock->c.flc_flags |= FL_SLEEP; in smb2_set_flock_flags() 7404 flock->c.flc_type = F_RDLCK; in smb2_set_flock_flags() 7410 flock->c.flc_type = F_WRLCK; in smb2_set_flock_flags() 7414 flock->c.flc_type = F_UNLCK; in smb2_set_flock_flags() 7422 static struct ksmbd_lock *smb2_lock_init(struct file_lock *flock, in smb2_lock_init() argument 7433 lock->fl = flock; in smb2_lock_init() [all …]
|
| /linux/net/9p/ |
| H A D | client.c | 2108 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument 2117 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl() 2118 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl() 2120 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl() 2121 flock->flags, flock->start, flock->length, in p9_client_lock_dotl() 2122 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
|
| /linux/fs/afs/ |
| H A D | Makefile | 19 flock.o \
|
| /linux/tools/perf/trace/beauty/ |
| H A D | Build | 3 perf-y += flock.o
|
| /linux/tools/include/uapi/asm-generic/ |
| H A D | fcntl.h | |
| /linux/include/uapi/asm-generic/ |
| H A D | fcntl.h | 194 struct flock { struct
|
| /linux/arch/um/os-Linux/ |
| H A D | file.c | 577 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
|
| /linux/tools/power/x86/intel-speed-select/ |
| H A D | isst-daemon.c | 212 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
|
| /linux/include/net/9p/ |
| H A D | client.h | 322 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
| /linux/tools/perf/util/ |
| H A D | bpf_counter.c | 418 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map() 549 * Use flock() to ensure exclusive access to the perf_event_attr in bperf__load() 651 flock(attr_map_fd, LOCK_UN); in bperf__load()
|
| /linux/fs/fuse/ |
| H A D | file.c | 364 if (ra && ff->flock) { in fuse_file_release() 2471 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument 2484 if (flock) in fuse_lk_fill() 2513 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument 2529 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk() 2574 ff->flock = true; in fuse_file_flock() 3180 .flock = fuse_file_flock,
|
| /linux/fs/nfs/ |
| H A D | nfs4file.c | 445 .flock = nfs_flock,
|
| /linux/fs/ocfs2/ |
| H A D | file.c | 2821 .flock = ocfs2_flock, 2843 .flock = ocfs2_flock, 2872 .flock = ocfs2_flock, 2891 .flock = ocfs2_flock,
|