Home
last modified time | relevance | path

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

123

/Linux-v5.10/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()
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/
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.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.
Docfs2.rst90 localflocks This disables cluster aware flock.
/Linux-v5.10/fs/cifs/
Dfile.c1034 __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 …]
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()
159 if (!(flock->fl_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
Dcifsfs.c1242 .flock = cifs_flock,
1262 .flock = cifs_flock,
1282 .flock = cifs_flock,
/Linux-v5.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); \
/Linux-v5.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 $<
/Linux-v5.10/arch/mips/include/uapi/asm/
Dfcntl.h64 struct flock { struct
/Linux-v5.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 …]
/Linux-v5.10/tools/perf/trace/beauty/
DBuild3 perf-y += flock.o
/Linux-v5.10/fs/afs/
DMakefile19 flock.o \
/Linux-v5.10/net/9p/
Dclient.c2208 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/
Dfcntl.h195 struct flock { struct
/Linux-v5.10/include/uapi/asm-generic/
Dfcntl.h196 struct flock { struct
/Linux-v5.10/include/net/9p/
Dclient.h218 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
/Linux-v5.10/arch/um/os-Linux/
Dfile.c580 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
/Linux-v5.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 …]
/Linux-v5.10/kernel/
Dsys_ni.c86 COND_SYSCALL(flock);
/Linux-v5.10/fs/nfs/
Dnfs4file.c447 .flock = nfs_flock,
/Linux-v5.10/fs/fuse/
Dfile.c300 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/
Dfs.h1119 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

123