/Linux-v4.19/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 | 506 struct flock *l) in flock_to_posix_lock() 1985 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument 2017 if (f.file->f_op->flock) in SYSCALL_DEFINE2() 2018 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2() 2081 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument 2083 flock->l_pid = locks_translate_pid(fl, task_active_pid_ns(current)); in posix_lock_to_flock() 2094 flock->l_start = fl->fl_start; in posix_lock_to_flock() 2095 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock() 2097 flock->l_whence = 0; in posix_lock_to_flock() 2098 flock->l_type = fl->fl_type; in posix_lock_to_flock() [all …]
|
/Linux-v4.19/fs/9p/ |
D | vfs_file.c | 152 struct p9_flock flock; in v9fs_file_do_lock() local 169 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock() 173 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock() 176 flock.type = P9_LOCK_TYPE_WRLCK; in v9fs_file_do_lock() 179 flock.type = P9_LOCK_TYPE_UNLCK; in v9fs_file_do_lock() 182 flock.start = fl->fl_start; in v9fs_file_do_lock() 184 flock.length = 0; in v9fs_file_do_lock() 186 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock() 187 flock.proc_id = fl->fl_pid; in v9fs_file_do_lock() 188 flock.client_id = fid->clnt->name; in v9fs_file_do_lock() [all …]
|
/Linux-v4.19/Documentation/filesystems/ |
D | locks.txt | 14 The old flock(2) emulation in the kernel was swapped for proper BSD 15 compatible flock(2) support in the 1.3.x series of kernels. With the 29 Because sendmail was unable to use the old flock() emulation, many sendmail 30 installations use fcntl() instead of flock(). This is true of Slackware 3.0 34 file with flock(). With pre 1.3.96 kernels this could result in deadlocks that, 42 is to make flock() and fcntl() locks oblivious to each other. Both can 49 cooperative flock()/fcntl() are those that emulate flock() using
|
D | mandatory-locking.txt | 32 processes. File locks are applied using the flock() and fcntl() system calls 120 locks using flock() never result in a mandatory lock.
|
D | ocfs2.txt | 80 localflocks This disables cluster aware flock.
|
D | 00-INDEX | 89 - info on file locking implementations, flock() vs. fcntl(), etc.
|
/Linux-v4.19/fs/cifs/ |
D | file.c | 956 __u8 type, struct file_lock *flock) in cifs_lock_test() argument 969 flock->fl_start = conf_lock->offset; in cifs_lock_test() 970 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test() 971 flock->fl_pid = conf_lock->pid; in cifs_lock_test() 973 flock->fl_type = F_RDLCK; in cifs_lock_test() 975 flock->fl_type = F_WRLCK; in cifs_lock_test() 979 flock->fl_type = F_UNLCK; in cifs_lock_test() 1049 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument 1053 unsigned char saved_type = flock->fl_type; in cifs_posix_lock_test() 1055 if ((flock->fl_flags & FL_POSIX) == 0) in cifs_posix_lock_test() [all …]
|
D | smb2file.c | 109 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument 118 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range() 140 if (flock->fl_start > li->offset || in smb2_unlock_range() 141 (flock->fl_start + length) < in smb2_unlock_range()
|
D | smb2proto.h | 113 struct file_lock *flock, const unsigned int xid);
|
/Linux-v4.19/drivers/nvme/target/ |
D | fc.c | 86 spinlock_t flock; member 443 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist() 733 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue() 736 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 743 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue() 745 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 1934 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 1936 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 1977 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 1980 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_fod_op_done() [all …]
|
/Linux-v4.19/arch/mips/include/uapi/asm/ |
D | fcntl.h | 64 struct flock { struct
|
/Linux-v4.19/tools/perf/trace/beauty/ |
D | Build | 3 libperf-y += flock.o
|
/Linux-v4.19/fs/afs/ |
D | Makefile | 18 flock.o \
|
/Linux-v4.19/net/9p/ |
D | client.c | 2193 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument 2203 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl() 2204 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl() 2206 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl() 2207 flock->flags, flock->start, flock->length, in p9_client_lock_dotl() 2208 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
|
/Linux-v4.19/tools/include/uapi/asm-generic/ |
D | fcntl.h | 195 struct flock { struct
|
/Linux-v4.19/include/uapi/asm-generic/ |
D | fcntl.h | 196 struct flock { struct
|
/Linux-v4.19/include/net/9p/ |
D | client.h | 267 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
/Linux-v4.19/arch/um/os-Linux/ |
D | file.c | 575 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
|
/Linux-v4.19/Documentation/x86/ |
D | intel_rdt_ui.txt | 900 Locking is based on flock, which is available in libc and also as a shell 905 A) Take flock(LOCK_EX) on /sys/fs/resctrl 911 A) Take flock(LOCK_SH) on /sys/fs/resctrl 918 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl 928 $ flock /sys/fs/resctrl/ ./create-dir.sh 944 ret = flock(fd, LOCK_SH); 946 perror("flock"); 956 ret = flock(fd, LOCK_EX); 958 perror("flock"); 968 ret = flock(fd, LOCK_UN); [all …]
|
/Linux-v4.19/fs/nfs/ |
D | nfs4file.c | 256 .flock = nfs_flock,
|
/Linux-v4.19/kernel/ |
D | sys_ni.c | 81 COND_SYSCALL(flock);
|
/Linux-v4.19/fs/fuse/ |
D | file.c | 255 if (ff->flock) { in fuse_release_common() 2132 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument 2145 if (flock) in fuse_lk_fill() 2174 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument 2194 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk() 2239 ff->flock = true; in fuse_file_flock() 3024 .flock = fuse_file_flock, 3042 .flock = fuse_file_flock,
|
D | fuse_i.h | 158 bool flock:1; member
|
/Linux-v4.19/include/linux/ |
D | fs.h | 1078 extern int fcntl_getlk(struct file *, unsigned int, struct flock *); 1080 struct flock *); 1118 struct flock __user *user) in fcntl_getlk() 1124 unsigned int cmd, struct flock __user *user) in fcntl_setlk() 1750 int (*flock) (struct file *, int, struct file_lock *); member
|