Home
last modified time | relevance | path

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

123

/kernel/linux/linux-5.10/fs/
Dfcntl.c334 struct flock flock; in do_fcntl() local
362 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl()
364 err = fcntl_getlk(filp, cmd, &flock); in do_fcntl()
365 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl()
376 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl()
378 err = fcntl_setlk(fd, filp, cmd, &flock); in do_fcntl()
485 struct flock64 flock; in SYSCALL_DEFINE3() local
504 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3()
506 err = fcntl_getlk64(f.file, cmd, &flock); in SYSCALL_DEFINE3()
507 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3()
[all …]
Dlocks.c569 struct flock *l) in flock_to_posix_lock()
2219 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument
2251 if (f.file->f_op->flock) in SYSCALL_DEFINE2()
2252 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2()
2315 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument
2317 flock->l_pid = locks_translate_pid(fl, task_active_pid_ns(current)); in posix_lock_to_flock()
2328 flock->l_start = fl->fl_start; in posix_lock_to_flock()
2329 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock()
2331 flock->l_whence = 0; in posix_lock_to_flock()
2332 flock->l_type = fl->fl_type; in posix_lock_to_flock()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/build/test/kernel_ltp/syscalls/flock/
DBUILD.gn19 sources = [ "//third_party/ltp/testcases/kernel/syscalls/flock/flock01.c" ]
24 sources = [ "//third_party/ltp/testcases/kernel/syscalls/flock/flock02.c" ]
29 sources = [ "//third_party/ltp/testcases/kernel/syscalls/flock/flock03.c" ]
34 sources = [ "//third_party/ltp/testcases/kernel/syscalls/flock/flock04.c" ]
39 sources = [ "//third_party/ltp/testcases/kernel/syscalls/flock/flock06.c" ]
/kernel/linux/linux-5.10/Documentation/filesystems/
Dlocks.rst18 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
Dmandatory-locking.rst37 processes. File locks are applied using the flock() and fcntl() system calls
127 locks using flock() never result in a mandatory lock.
/kernel/linux/linux-5.10/fs/cifs/
Dfile.c1035 __u8 type, struct file_lock *flock) in cifs_lock_test() argument
1046 flock->fl_flags, &conf_lock, in cifs_lock_test()
1049 flock->fl_start = conf_lock->offset; in cifs_lock_test()
1050 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test()
1051 flock->fl_pid = conf_lock->pid; in cifs_lock_test()
1053 flock->fl_type = F_RDLCK; in cifs_lock_test()
1055 flock->fl_type = F_WRLCK; in cifs_lock_test()
1059 flock->fl_type = F_UNLCK; in cifs_lock_test()
1130 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument
1134 unsigned char saved_type = flock->fl_type; in cifs_posix_lock_test()
[all …]
Dsmb2file.c116 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument
125 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range()
149 if (flock->fl_start > li->offset || in smb2_unlock_range()
150 (flock->fl_start + length) < in smb2_unlock_range()
158 if (!(flock->fl_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
/kernel/liteos_a/kernel/base/vm/
Dlos_vm_scan.c245 SPIN_LOCK_S *flock = NULL; in OsShrinkInactiveList() local
252 flock = &fpage->mapping->list_lock; in OsShrinkInactiveList()
254 if (LOS_SpinTrylock(flock) != LOS_OK) { in OsShrinkInactiveList()
260 LOS_SpinUnlock(flock); in OsShrinkInactiveList()
265 LOS_SpinUnlock(flock); in OsShrinkInactiveList()
277 LOS_SpinUnlock(flock); in OsShrinkInactiveList()
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/nx-gzip/include/
Dnx_dbg.h34 flock(nx_gzip_log->_fileno, LOCK_EX); \
42 flock(nx_gzip_log->_fileno, LOCK_UN); \
/kernel/linux/build/test/kernel_ltp/syscalls/
DBUILD.gn193 "flock:flock01",
194 "flock:flock02",
195 "flock:flock03",
196 "flock:flock04",
197 "flock:flock06",
/kernel/linux/linux-5.10/tools/testing/selftests/wireguard/qemu/
DMakefile41flock -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 $<
/kernel/linux/linux-5.10/arch/mips/include/uapi/asm/
Dfcntl.h64 struct flock { struct
/kernel/linux/linux-5.10/drivers/nvme/target/
Dfc.c85 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 …]
/kernel/linux/linux-5.10/tools/perf/trace/beauty/
DBuild3 perf-y += flock.o
/kernel/linux/linux-5.10/fs/afs/
DMakefile19 flock.o \
/kernel/linux/linux-5.10/net/9p/
Dclient.c2203 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument
2213 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl()
2214 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl()
2216 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl()
2217 flock->flags, flock->start, flock->length, in p9_client_lock_dotl()
2218 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
/kernel/linux/linux-5.10/tools/include/uapi/asm-generic/
Dfcntl.h195 struct flock { struct
/kernel/linux/linux-5.10/include/uapi/asm-generic/
Dfcntl.h196 struct flock { struct
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/asm-generic/
Dfcntl.h150 struct flock { struct
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/asm-generic/
Dfcntl.h135 struct flock { struct
/kernel/linux/linux-5.10/include/net/9p/
Dclient.h218 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
/kernel/linux/linux-5.10/arch/um/os-Linux/
Dfile.c580 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
/kernel/linux/linux-5.10/Documentation/x86/
Dresctrl_ui.rst991 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 …]
/kernel/linux/linux-5.10/kernel/
Dsys_ni.c86 COND_SYSCALL(flock);

123