/Linux-v5.10/fs/ |
D | fcntl.c | 326 struct flock flock; in do_fcntl() local 354 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 356 err = fcntl_getlk(filp, cmd, &flock); in do_fcntl() 357 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl() 368 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl() 370 err = fcntl_setlk(fd, filp, cmd, &flock); in do_fcntl() 477 struct flock64 flock; in SYSCALL_DEFINE3() local 496 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3() 498 err = fcntl_getlk64(f.file, cmd, &flock); in SYSCALL_DEFINE3() 499 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3() [all …]
|
D | locks.c | 569 struct flock *l) in flock_to_posix_lock() 2222 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument 2254 if (f.file->f_op->flock) in SYSCALL_DEFINE2() 2255 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2() 2318 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument 2320 flock->l_pid = locks_translate_pid(fl, task_active_pid_ns(current)); in posix_lock_to_flock() 2331 flock->l_start = fl->fl_start; in posix_lock_to_flock() 2332 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock() 2334 flock->l_whence = 0; in posix_lock_to_flock() 2335 flock->l_type = fl->fl_type; in posix_lock_to_flock() [all …]
|
/Linux-v5.10/fs/9p/ |
D | vfs_file.c | 137 struct p9_flock flock; in v9fs_file_do_lock() local 155 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock() 159 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock() 162 flock.type = P9_LOCK_TYPE_WRLCK; in v9fs_file_do_lock() 165 flock.type = P9_LOCK_TYPE_UNLCK; in v9fs_file_do_lock() 168 flock.start = fl->fl_start; in v9fs_file_do_lock() 170 flock.length = 0; in v9fs_file_do_lock() 172 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock() 173 flock.proc_id = fl->fl_pid; in v9fs_file_do_lock() 174 flock.client_id = fid->clnt->name; in v9fs_file_do_lock() [all …]
|
/Linux-v5.10/Documentation/filesystems/ |
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
|
D | mandatory-locking.rst | 37 processes. File locks are applied using the flock() and fcntl() system calls 127 locks using flock() never result in a mandatory lock.
|
D | ocfs2.rst | 90 localflocks This disables cluster aware flock.
|
/Linux-v5.10/fs/cifs/ |
D | file.c | 1034 __u8 type, struct file_lock *flock) in cifs_lock_test() argument 1045 flock->fl_flags, &conf_lock, in cifs_lock_test() 1048 flock->fl_start = conf_lock->offset; in cifs_lock_test() 1049 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test() 1050 flock->fl_pid = conf_lock->pid; in cifs_lock_test() 1052 flock->fl_type = F_RDLCK; in cifs_lock_test() 1054 flock->fl_type = F_WRLCK; in cifs_lock_test() 1058 flock->fl_type = F_UNLCK; in cifs_lock_test() 1129 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument 1133 unsigned char saved_type = flock->fl_type; in cifs_posix_lock_test() [all …]
|
D | smb2file.c | 117 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument 126 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range() 150 if (flock->fl_start > li->offset || in smb2_unlock_range() 151 (flock->fl_start + length) < in smb2_unlock_range() 159 if (!(flock->fl_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
|
D | cifsfs.c | 1242 .flock = cifs_flock, 1262 .flock = cifs_flock, 1282 .flock = cifs_flock,
|
/Linux-v5.10/tools/testing/selftests/powerpc/nx-gzip/include/ |
D | nx_dbg.h | 34 flock(nx_gzip_log->_fileno, LOCK_EX); \ 42 flock(nx_gzip_log->_fileno, LOCK_UN); \
|
/Linux-v5.10/tools/testing/selftests/wireguard/qemu/ |
D | Makefile | 41 …flock -x $$@.lock -c '[ -f $$@ ] && exit 0; wget -O $$@.tmp $(MIRROR)$(1) || wget -O $$@.tmp $(2)$… 270 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 286 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 298 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 312 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 322 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 332 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 347 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 358 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
|
/Linux-v5.10/arch/mips/include/uapi/asm/ |
D | fcntl.h | 64 struct flock { struct
|
/Linux-v5.10/drivers/nvme/target/ |
D | fc.c | 85 spinlock_t flock; member 640 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist() 902 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue() 911 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 915 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 2290 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 2292 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 2333 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 2336 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_fod_op_done() 2345 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() [all …]
|
/Linux-v5.10/tools/perf/trace/beauty/ |
D | Build | 3 perf-y += flock.o
|
/Linux-v5.10/fs/afs/ |
D | Makefile | 19 flock.o \
|
/Linux-v5.10/net/9p/ |
D | client.c | 2208 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument 2218 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl() 2219 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl() 2221 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl() 2222 flock->flags, flock->start, flock->length, in p9_client_lock_dotl() 2223 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
|
/Linux-v5.10/tools/include/uapi/asm-generic/ |
D | fcntl.h | 195 struct flock { struct
|
/Linux-v5.10/include/uapi/asm-generic/ |
D | fcntl.h | 196 struct flock { struct
|
/Linux-v5.10/include/net/9p/ |
D | client.h | 218 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
/Linux-v5.10/arch/um/os-Linux/ |
D | file.c | 580 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
|
/Linux-v5.10/Documentation/x86/ |
D | resctrl_ui.rst | 991 Locking is based on flock, which is available in libc and also as a shell 996 A) Take flock(LOCK_EX) on /sys/fs/resctrl 1002 A) Take flock(LOCK_SH) on /sys/fs/resctrl 1009 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl 1019 $ flock /sys/fs/resctrl/ ./create-dir.sh 1035 ret = flock(fd, LOCK_SH); 1037 perror("flock"); 1047 ret = flock(fd, LOCK_EX); 1049 perror("flock"); 1059 ret = flock(fd, LOCK_UN); [all …]
|
/Linux-v5.10/kernel/ |
D | sys_ni.c | 86 COND_SYSCALL(flock);
|
/Linux-v5.10/fs/nfs/ |
D | nfs4file.c | 447 .flock = nfs_flock,
|
/Linux-v5.10/fs/fuse/ |
D | file.c | 300 if (ff->flock) { in fuse_release_common() 2399 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument 2412 if (flock) in fuse_lk_fill() 2441 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument 2461 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk() 2506 ff->flock = true; in fuse_file_flock() 3447 .flock = fuse_file_flock,
|
/Linux-v5.10/include/linux/ |
D | fs.h | 1119 extern int fcntl_getlk(struct file *, unsigned int, struct flock *); 1121 struct flock *); 1164 struct flock __user *user) in fcntl_getlk() 1170 unsigned int cmd, struct flock __user *user) in fcntl_setlk() 1846 int (*flock) (struct file *, int, struct file_lock *); member
|