Home
last modified time | relevance | path

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

123

/linux/fs/9p/
H A Dvfs_file.c125 struct p9_flock flock; in v9fs_file_do_lock() local
141 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock()
145 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock()
148 flock.type = P9_LOCK_TYPE_WRLCK; in v9fs_file_do_lock()
151 flock.type = P9_LOCK_TYPE_UNLCK; in v9fs_file_do_lock()
154 flock.start = fl->fl_start; in v9fs_file_do_lock()
156 flock.length = 0; in v9fs_file_do_lock()
158 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock()
159 flock.proc_id = fl->c.flc_pid; in v9fs_file_do_lock()
160 flock.client_id = fid->clnt->name; in v9fs_file_do_lock()
[all …]
/linux/Documentation/filesystems/
H A 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
H A Docfs2.rst90 localflocks This disables cluster aware flock.
/linux/fs/smb/client/
H A Dfile.c1678 __u8 type, struct file_lock *flock) in cifs_lock_test() argument
1689 flock->c.flc_flags, &conf_lock, in cifs_lock_test()
1692 flock->fl_start = conf_lock->offset; in cifs_lock_test()
1693 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test()
1694 flock->c.flc_pid = conf_lock->pid; in cifs_lock_test()
1696 flock->c.flc_type = F_RDLCK; in cifs_lock_test()
1698 flock->c.flc_type = F_WRLCK; in cifs_lock_test()
1702 flock->c.flc_type = F_UNLCK; in cifs_lock_test()
1774 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument
1778 unsigned char saved_type = flock->c.flc_type; in cifs_posix_lock_test()
[all …]
H A Dsmb2file.c258 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument
267 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range()
289 if (flock->fl_start > li->offset || in smb2_unlock_range()
290 (flock->fl_start + length) < in smb2_unlock_range()
298 if (!(flock->c.flc_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
H A Dsmb2proto.h118 struct file_lock *flock, const unsigned int xid);
H A Dcifsfs.c1598 .flock = cifs_flock,
1618 .flock = cifs_flock,
1638 .flock = cifs_flock,
/linux/fs/
H A Dlocks.c542 struct flock *l) in flock_to_posix_lock()
2186 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument
2225 if (fd_file(f)->f_op->flock) in SYSCALL_DEFINE2()
2226 error = fd_file(f)->f_op->flock(fd_file(f), in SYSCALL_DEFINE2()
2296 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument
2298 flock->l_pid = locks_translate_pid(&fl->c, task_active_pid_ns(current)); in posix_lock_to_flock()
2309 flock->l_start = fl->fl_start; in posix_lock_to_flock()
2310 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock()
2312 flock->l_whence = 0; in posix_lock_to_flock()
2313 flock->l_type = fl->c.flc_type; in posix_lock_to_flock()
[all …]
/linux/tools/testing/selftests/filelock/
H A Dofdlocks.c11 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/arch/arm/kernel/
H A Dsys_oabi-compat.c239 struct flock64 flock; in sys_oabi_fcntl64() local
251 err = get_oabi_flock(&flock, argp); in sys_oabi_fcntl64()
254 err = fcntl_getlk64(fd_file(f), cmd, &flock); in sys_oabi_fcntl64()
256 err = put_oabi_flock(&flock, argp); in sys_oabi_fcntl64()
265 err = get_oabi_flock(&flock, argp); in sys_oabi_fcntl64()
268 err = fcntl_setlk64(fd, fd_file(f), cmd, &flock); in sys_oabi_fcntl64()
/linux/tools/testing/selftests/powerpc/nx-gzip/include/
H A Dnx_dbg.h34 flock(nx_gzip_log->_fileno, LOCK_EX); \
42 flock(nx_gzip_log->_fileno, LOCK_UN); \
/linux/tools/testing/selftests/wireguard/qemu/
H A DMakefile37 flock -x $$@.lock -c '[ -f $$@ ] && exit 0; wget -O $$@.tmp $(MIRROR)$(1) || wget -O $$@.tmp $(2)$(1) || rm -f $$@.tmp; [ -f $$@.tmp ] || exit 1; if ([ -n "$(4)" ] && sed -n "s#^\([a-f0-9]\{64\}\) \($(1)\)\$$$$#\1 $(DISTFILES_PATH)/\2.tmp#p" "$(4)" || echo "$(3) $$@.tmp") | sha256sum -c -; then mv $$@.tmp $$@; else rm -f $$@.tmp; exit 71; fi'
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 $<
412 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
427 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
438 flock -s $<.lock tar -C $(BUILD_PATH) -xf $<
/linux/drivers/nvme/target/
H A Dfc.c87 spinlock_t flock; member
634 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist()
883 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue()
892 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue()
896 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue()
2318 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_transfer_fcp_data()
2320 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_transfer_fcp_data()
2361 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done()
2364 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_fod_op_done()
2373 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done()
[all …]
/linux/net/9p/
H A Dclient.c2108 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) in p9_client_lock_dotl() argument
2117 fid->fid, flock->type, flock->flags, flock->start, in p9_client_lock_dotl()
2118 flock->length, flock->proc_id, flock->client_id); in p9_client_lock_dotl()
2120 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type, in p9_client_lock_dotl()
2121 flock->flags, flock->start, flock->length, in p9_client_lock_dotl()
2122 flock->proc_id, flock->client_id); in p9_client_lock_dotl()
/linux/fs/smb/server/
H A Dsmb2pdu.c7272 static int smb2_set_flock_flags(struct file_lock *flock, int flags) in smb2_set_flock_flags()
7281 flock->c.flc_type = F_RDLCK; in smb2_set_flock_flags()
7282 flock->c.flc_flags |= FL_SLEEP; in smb2_set_flock_flags()
7287 flock->c.flc_type = F_WRLCK; in smb2_set_flock_flags()
7288 flock->c.flc_flags |= FL_SLEEP; in smb2_set_flock_flags()
7294 flock->c.flc_type = F_RDLCK; in smb2_set_flock_flags()
7300 flock->c.flc_type = F_WRLCK; in smb2_set_flock_flags()
7304 flock->c.flc_type = F_UNLCK; in smb2_set_flock_flags()
7312 static struct ksmbd_lock *smb2_lock_init(struct file_lock *flock, in smb2_lock_init()
7323 lock->fl = flock; in smb2_lock_init()
7266 smb2_set_flock_flags(struct file_lock * flock,int flags) smb2_set_flock_flags() argument
7306 smb2_lock_init(struct file_lock * flock,unsigned int cmd,int flags,struct list_head * lock_list) smb2_lock_init() argument
7333 struct file_lock *flock = (struct file_lock *)argv[0]; smb2_remove_blocked_lock() local
7357 struct file_lock *flock = NULL; smb2_lock() local
[all...]
/linux/tools/perf/trace/beauty/
H A DBuild3 perf-y += flock.o
/linux/tools/include/uapi/asm-generic/
H A Dfcntl.h
/linux/include/uapi/asm-generic/
H A Dfcntl.h194 struct flock { struct
/linux/arch/um/os-Linux/
H A Dfile.c577 struct flock lock = ((struct flock) { .l_type = type, in os_lock_file()
/linux/tools/power/x86/intel-speed-select/
H A Disst-daemon.c212 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
/linux/include/net/9p/
H A Dclient.h322 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
/linux/tools/perf/util/
H A Dbpf_counter.c416 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map()
649 flock(attr_map_fd, LOCK_UN); in bperf__load()
/linux/kernel/
H A Dsys_ni.c66 COND_SYSCALL(flock);
/linux/fs/fuse/
H A Dfile.c358 if (ra && ff->flock) { in fuse_file_release()
2463 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument
2476 if (flock) in fuse_lk_fill()
2505 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument
2521 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk()
2566 ff->flock = true; in fuse_file_flock()
3172 .flock = fuse_file_flock,
/linux/fs/ocfs2/
H A Dfile.c2820 .flock = ocfs2_flock,
2841 .flock = ocfs2_flock,
2869 .flock = ocfs2_flock,
2887 .flock = ocfs2_flock,

123