/linux/fs/9p/ |
H A D | vfs_file.c | 120 struct p9_flock flock; in v9fs_file_do_lock() local 136 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock() 140 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock() 143 flock.type = P9_LOCK_TYPE_WRLCK; in v9fs_file_do_lock() 146 flock.type = P9_LOCK_TYPE_UNLCK; in v9fs_file_do_lock() 149 flock.start = fl->fl_start; in v9fs_file_do_lock() 151 flock.length = 0; in v9fs_file_do_lock() 153 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock() 154 flock.proc_id = fl->c.flc_pid; in v9fs_file_do_lock() 155 flock.client_id = fid->clnt->name; in v9fs_file_do_lock() [all …]
|
/linux/fs/smb/client/ |
H A D | file.c | 1581 __u8 type, struct file_lock *flock) in cifs_lock_test() argument 1592 flock->c.flc_flags, &conf_lock, in cifs_lock_test() 1595 flock->fl_start = conf_lock->offset; in cifs_lock_test() 1596 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test() 1597 flock->c.flc_pid = conf_lock->pid; in cifs_lock_test() 1599 flock->c.flc_type = F_RDLCK; in cifs_lock_test() 1601 flock->c.flc_type = F_WRLCK; in cifs_lock_test() 1605 flock->c.flc_type = F_UNLCK; in cifs_lock_test() 1677 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument 1681 unsigned char saved_type = flock->c.flc_type; in cifs_posix_lock_test() [all …]
|
H A D | smb2file.c | 189 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument 198 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range() 220 if (flock->fl_start > li->offset || in smb2_unlock_range() 221 (flock->fl_start + length) < in smb2_unlock_range() 226 * flock and OFD lock are associated with an open in smb2_unlock_range() 229 if (!(flock->c.flc_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
|
H A D | cifsfs.c | 1478 .flock = cifs_flock, 1498 .flock = cifs_flock, 1518 .flock = cifs_flock,
|
/linux/Documentation/filesystems/ |
H A 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
|
H A D | ocfs2.rst | 90 localflocks This disables cluster aware flock.
|
/linux/fs/ |
H A D | locks.c | 542 struct flock *l) in flock_to_posix_lock() 2135 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument 2176 if (fd_file(f)->f_op->flock) in SYSCALL_DEFINE2() 2177 error = fd_file(f)->f_op->flock(fd_file(f), in SYSCALL_DEFINE2() 2242 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument 2244 flock->l_pid = locks_translate_pid(&fl->c, task_active_pid_ns(current)); in posix_lock_to_flock() 2255 flock->l_start = fl->fl_start; in posix_lock_to_flock() 2256 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock() 2258 flock->l_whence = 0; in posix_lock_to_flock() 2259 flock->l_type = fl->c.flc_type; in posix_lock_to_flock() [all …]
|
/linux/tools/testing/selftests/filelock/ |
H A D | ofdlocks.c | 11 static int lock_set(int fd, struct flock *fl) in lock_set() 23 static int lock_get(int fd, struct flock *fl) in lock_get() 38 struct flock fl, fl2; in main()
|
/linux/tools/testing/selftests/powerpc/nx-gzip/include/ |
H A D | nx_dbg.h | 34 flock(nx_gzip_log->_fileno, LOCK_EX); \ 42 flock(nx_gzip_log->_fileno, LOCK_UN); \
|
/linux/tools/testing/selftests/wireguard/qemu/ |
H A D | Makefile | 37 …flock -x $$@.lock -c '[ -f $$@ ] && exit 0; wget -O $$@.tmp $(MIRROR)$(1) || wget -O $$@.tmp $(2)$… 354 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 364 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 377 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 391 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 401 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 411 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 426 flock -s $<.lock tar -C $(BUILD_PATH) -xf $< 437 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
|
/linux/include/linux/ |
H A D | filelock.h | 150 int fcntl_getlk(struct file *, unsigned int, struct flock *); 152 struct flock *); 230 struct flock __user *user) in fcntl_getlk() 236 unsigned int cmd, struct flock __user *user) in fcntl_setlk()
|
/linux/drivers/nvme/target/ |
H A D | fc.c | 85 spinlock_t flock; member 650 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist() 897 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue() 906 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 910 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue() 2319 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 2321 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_transfer_fcp_data() 2362 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() 2365 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_fod_op_done() 2374 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done() [all …]
|
/linux/net/9p/ |
H A D | client.c | 2213 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument 2222 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl() 2223 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl() 2225 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl() 2226 flock->flags, flock->start, flock->length, in p9_client_lock_dotl() 2227 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
|
/linux/fs/afs/ |
H A D | Makefile | 17 flock.o \
|
/linux/fs/smb/server/ |
H A D | smb2pdu.c | 7096 static int smb2_set_flock_flags(struct file_lock *flock, int flags) in smb2_set_flock_flags() argument 7105 flock->c.flc_type = F_RDLCK; in smb2_set_flock_flags() 7106 flock->c.flc_flags |= FL_SLEEP; in smb2_set_flock_flags() 7111 flock->c.flc_type = F_WRLCK; in smb2_set_flock_flags() 7112 flock->c.flc_flags |= FL_SLEEP; in smb2_set_flock_flags() 7118 flock->c.flc_type = F_RDLCK; in smb2_set_flock_flags() 7124 flock->c.flc_type = F_WRLCK; in smb2_set_flock_flags() 7128 flock->c.flc_type = F_UNLCK; in smb2_set_flock_flags() 7136 static struct ksmbd_lock *smb2_lock_init(struct file_lock *flock, in smb2_lock_init() argument 7147 lock->fl = flock; in smb2_lock_init() [all …]
|
/linux/tools/perf/trace/beauty/ |
H A D | Build | 3 perf-y += flock.o
|
/linux/tools/include/uapi/asm-generic/ |
H A D | fcntl.h |
|
/linux/include/uapi/asm-generic/ |
H A D | fcntl.h | 195 struct flock { struct
|
/linux/tools/power/x86/intel-speed-select/ |
H A D | isst-daemon.c | 212 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
|
/linux/include/net/9p/ |
H A D | client.h | 226 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
/linux/tools/perf/util/ |
H A D | bpf_counter.c | 357 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map() 571 flock(attr_map_fd, LOCK_UN); in bperf__load()
|
/linux/Documentation/arch/x86/ |
H A D | resctrl.rst | 1200 Locking is based on flock, which is available in libc and also as a shell 1205 A) Take flock(LOCK_EX) on /sys/fs/resctrl 1211 A) Take flock(LOCK_SH) on /sys/fs/resctrl 1218 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl 1228 $ flock /sys/fs/resctrl/ ./create-dir.sh 1244 ret = flock(fd, LOCK_SH); 1246 perror("flock"); 1256 ret = flock(fd, LOCK_EX); 1258 perror("flock"); 1268 ret = flock(fd, LOCK_UN); [all …]
|
/linux/kernel/ |
H A D | sys_ni.c | 66 COND_SYSCALL(flock);
|
/linux/fs/fuse/ |
H A D | file.c | 345 if (ra && ff->flock) { in fuse_file_release() 2631 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument 2644 if (flock) in fuse_lk_fill() 2673 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument 2689 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk() 2734 ff->flock = true; in fuse_file_flock() 3317 .flock = fuse_file_flock,
|
/linux/fs/nfs/ |
H A D | nfs4file.c | 457 .flock = nfs_flock,
|