Home
last modified time | relevance | path

Searched refs:flock (Results 1 – 25 of 55) sorted by relevance

123

/Linux-v5.4/fs/
Dfcntl.c326 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 …]
Dlocks.c569 struct flock *l) in flock_to_posix_lock()
2188 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument
2220 if (f.file->f_op->flock) in SYSCALL_DEFINE2()
2221 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2()
2284 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument
2286 flock->l_pid = locks_translate_pid(fl, task_active_pid_ns(current)); in posix_lock_to_flock()
2297 flock->l_start = fl->fl_start; in posix_lock_to_flock()
2298 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock()
2300 flock->l_whence = 0; in posix_lock_to_flock()
2301 flock->l_type = fl->fl_type; in posix_lock_to_flock()
[all …]
/Linux-v5.4/fs/9p/
Dvfs_file.c137 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.4/Documentation/filesystems/
Dlocks.txt14 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
Dmandatory-locking.txt32 processes. File locks are applied using the flock() and fcntl() system calls
120 locks using flock() never result in a mandatory lock.
Docfs2.txt80 localflocks This disables cluster aware flock.
/Linux-v5.4/fs/cifs/
Dfile.c1003 __u8 type, struct file_lock *flock) in cifs_lock_test() argument
1014 flock->fl_flags, &conf_lock, in cifs_lock_test()
1017 flock->fl_start = conf_lock->offset; in cifs_lock_test()
1018 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test()
1019 flock->fl_pid = conf_lock->pid; in cifs_lock_test()
1021 flock->fl_type = F_RDLCK; in cifs_lock_test()
1023 flock->fl_type = F_WRLCK; in cifs_lock_test()
1027 flock->fl_type = F_UNLCK; in cifs_lock_test()
1098 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument
1102 unsigned char saved_type = flock->fl_type; in cifs_posix_lock_test()
[all …]
Dsmb2file.c117 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()
Dsmb2proto.h114 struct file_lock *flock, const unsigned int xid);
/Linux-v5.4/drivers/nvme/target/
Dfc.c74 spinlock_t flock; member
432 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist()
690 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue()
693 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue()
700 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue()
702 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue()
1942 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data()
1944 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_transfer_fcp_data()
1985 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done()
1988 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_fod_op_done()
[all …]
/Linux-v5.4/arch/mips/include/uapi/asm/
Dfcntl.h64 struct flock { struct
/Linux-v5.4/tools/perf/trace/beauty/
DBuild3 perf-y += flock.o
/Linux-v5.4/fs/afs/
DMakefile19 flock.o \
/Linux-v5.4/net/9p/
Dclient.c2196 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument
2206 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl()
2207 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl()
2209 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl()
2210 flock->flags, flock->start, flock->length, in p9_client_lock_dotl()
2211 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
/Linux-v5.4/include/uapi/asm-generic/
Dfcntl.h196 struct flock { struct
/Linux-v5.4/tools/include/uapi/asm-generic/
Dfcntl.h195 struct flock { struct
/Linux-v5.4/include/net/9p/
Dclient.h218 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
/Linux-v5.4/arch/um/os-Linux/
Dfile.c576 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
/Linux-v5.4/Documentation/x86/
Dresctrl_ui.rst977 Locking is based on flock, which is available in libc and also as a shell
982 A) Take flock(LOCK_EX) on /sys/fs/resctrl
988 A) Take flock(LOCK_SH) on /sys/fs/resctrl
995 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl
1005 $ flock /sys/fs/resctrl/ ./create-dir.sh
1021 ret = flock(fd, LOCK_SH);
1023 perror("flock");
1033 ret = flock(fd, LOCK_EX);
1035 perror("flock");
1045 ret = flock(fd, LOCK_UN);
[all …]
/Linux-v5.4/fs/nfs/
Dnfs4file.c277 .flock = nfs_flock,
/Linux-v5.4/kernel/
Dsys_ni.c86 COND_SYSCALL(flock);
/Linux-v5.4/fs/fuse/
Dfile.c285 if (ff->flock) { in fuse_release_common()
2335 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument
2348 if (flock) in fuse_lk_fill()
2377 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument
2397 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk()
2442 ff->flock = true; in fuse_file_flock()
3343 .flock = fuse_file_flock,
Dfuse_i.h218 bool flock:1; member
/Linux-v5.4/fs/ocfs2/
Dfile.c2675 .flock = ocfs2_flock,
2694 .flock = ocfs2_flock,
2721 .flock = ocfs2_flock,
2739 .flock = ocfs2_flock,
/Linux-v5.4/include/linux/
Dfs.h1136 extern int fcntl_getlk(struct file *, unsigned int, struct flock *);
1138 struct flock *);
1181 struct flock __user *user) in fcntl_getlk()
1187 unsigned int cmd, struct flock __user *user) in fcntl_setlk()
1838 int (*flock) (struct file *, int, struct file_lock *); member

123