Home
last modified time | relevance | path

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

123

/linux/fs/
H A Dfcntl.c453 struct flock flock; in do_fcntl() local
487 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl()
489 err = fcntl_getlk(filp, cmd, &flock); in do_fcntl()
490 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl()
501 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl()
503 err = fcntl_setlk(fd, filp, cmd, &flock); in do_fcntl()
616 struct flock64 flock; in SYSCALL_DEFINE3() local
635 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3()
637 err = fcntl_getlk64(fd_file(f), cmd, &flock); in SYSCALL_DEFINE3()
638 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3()
[all …]
H A Dnullfs.c40 .flock = nullfs_nolock,
98 .flock = nullfs_nolock,
/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 Dresctrl.rst1576 Locking is based on flock, which is available in libc and also as a shell
1581 A) Take flock(LOCK_EX) on /sys/fs/resctrl
1587 A) Take flock(LOCK_SH) on /sys/fs/resctrl
1594 $ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl
1604 $ flock /sys/fs/resctrl/ ./create-dir.sh
1620 ret = flock(fd, LOCK_SH);
1622 perror("flock");
1632 ret = flock(fd, LOCK_EX);
1634 perror("flock");
1644 ret = flock(f
[all...]
H A Docfs2.rst90 localflocks This disables cluster aware flock.
/linux/fs/smb/client/
H A Dfile.c2234 * style). If such a lock exists, update the flock structure with its in cifs_get_hardlink_path()
2235 * properties. Otherwise, set the flock type to F_UNLCK if we can cache brlocks in cifs_get_hardlink_path()
2241 __u8 type, struct file_lock *flock) in cifs_get_hardlink_path()
2252 flock->c.flc_flags, &conf_lock, in cifs_free_llist()
2255 flock->fl_start = conf_lock->offset; in cifs_free_llist()
2256 flock->fl_end = conf_lock->offset + conf_lock->length - 1;
2257 flock->c.flc_pid = conf_lock->pid;
2259 flock->c.flc_type = F_RDLCK; in cifs_unlock_range() argument
2261 flock->c.flc_type = F_WRLCK; in cifs_unlock_range()
2265 flock in cifs_unlock_range()
1730 cifs_lock_test(struct cifsFileInfo * cfile,__u64 offset,__u64 length,__u8 type,struct file_lock * flock) cifs_lock_test() argument
1832 cifs_posix_lock_test(struct file * file,struct file_lock * flock) cifs_posix_lock_test() argument
1861 cifs_posix_lock_set(struct file * file,struct file_lock * flock) cifs_posix_lock_set() argument
1979 struct file_lock *flock; cifs_push_posix_locks() local
2097 cifs_read_flock(struct file_lock * flock,__u32 * type,int * lock,int * unlock,bool * wait_flag,struct TCP_Server_Info * server) cifs_read_flock() argument
2145 cifs_getlk(struct file * file,struct file_lock * flock,__u32 type,bool wait_flag,bool posix_lck,unsigned int xid) cifs_getlk() argument
2371 cifs_setlk(struct file * file,struct file_lock * flock,__u32 type,bool wait_flag,bool posix_lck,int lock,int unlock,unsigned int xid) cifs_setlk() argument
2514 cifs_lock(struct file * file,int cmd,struct file_lock * flock) cifs_lock() argument
[all...]
H A Dcifsfs.h115 int cifs_lock(struct file *file, int cmd, struct file_lock *flock);
H A Dsmb2proto.h114 int smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
/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.c86 spinlock_t flock;
631 spin_lock_init(&fod->flock); in nvmet_fc_prep_fcp_iodlist()
889 spin_lock(&fod->flock); in nvmet_fc_delete_target_queue()
898 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue()
902 spin_unlock(&fod->flock); in nvmet_fc_delete_target_queue()
2328 spin_lock_irqsave(&fod->flock, flags);
2330 spin_unlock_irqrestore(&fod->flock, flags); in __nvmet_fc_fod_op_abort()
2371 spin_lock_irqsave(&fod->flock, flags); in nvmet_fc_fod_op_done()
2374 spin_unlock_irqrestore(&fod->flock, flags); in nvmet_fc_fod_op_done()
2383 spin_lock_irqsave(&fod->flock, flag in nvmet_fc_fod_op_done()
87 spinlock_t flock; global() member
[all...]
/linux/fs/smb/server/
H A Dvfs.h159 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock);
160 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock);
H A Dvfs.c305 struct file_lock *flock; in check_lock_range()
313 for_each_file_lock(flock, &ctx->flc_posix) { in check_lock_range()
315 if (flock->fl_end >= start && end >= flock->fl_start) { in check_lock_range()
316 if (lock_is_read(flock)) { in check_lock_range()
322 } else if (lock_is_write(flock)) { in check_lock_range()
324 if (flock->c.flc_file != filp) { in check_lock_range()
2288 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock) in ksmbd_vfs_update_compressed_fattr()
2290 wait_event(flock->c.flc_wait, !flock in ksmbd_vfs_update_compressed_fattr()
298 struct file_lock *flock; check_lock_range() local
2203 ksmbd_vfs_posix_lock_wait(struct file_lock * flock) ksmbd_vfs_posix_lock_wait() argument
2208 ksmbd_vfs_posix_lock_unblock(struct file_lock * flock) ksmbd_vfs_posix_lock_unblock() argument
[all...]
H A Dsmb2pdu.c10667 static int smb2_set_flock_flags(struct file_lock *flock, int flags) in fsctl_query_allocated_ranges()
10676 flock->c.flc_type = F_RDLCK; in fsctl_pipe_transceive()
10677 flock->c.flc_flags |= FL_SLEEP; in fsctl_pipe_transceive()
10682 flock->c.flc_type = F_WRLCK; in fsctl_pipe_transceive()
10683 flock->c.flc_flags |= FL_SLEEP; in fsctl_pipe_transceive()
10689 flock->c.flc_type = F_RDLCK; in fsctl_pipe_transceive()
10695 flock->c.flc_type = F_WRLCK; in fsctl_pipe_transceive()
10699 flock->c.flc_type = F_UNLCK; in fsctl_pipe_transceive()
10708 static struct ksmbd_lock *smb2_lock_init(struct file_lock *flock, in fsctl_pipe_transceive()
10720 lock->fl = flock; in fsctl_set_sparse()
9818 smb2_set_flock_flags(struct file_lock * flock,int flags) smb2_set_flock_flags() argument
9858 smb2_lock_init(struct file_lock * flock,unsigned int cmd,int flags,bool zero_len,struct list_head * lock_list) smb2_lock_init() argument
9884 struct file_lock *flock = (struct file_lock *)argv[0]; smb2_remove_blocked_lock() local
9890 smb2_free_lock(struct file_lock * flock) smb2_free_lock() argument
9896 smb2_free_blocked_lock(struct file_lock * flock) smb2_free_blocked_lock() argument
9921 struct file_lock *flock = NULL; smb2_lock() local
[all...]
/linux/fs/afs/
H A DMakefile19 flock.o \
/linux/tools/perf/trace/beauty/
H A DBuild3 perf-y += flock.o
/linux/tools/include/uapi/asm-generic/
H A Dfcntl.h
/linux/tools/testing/selftests/filesystems/mount_cycle/
H A Dmount_cover_test.c374 struct flock fl = { in TEST_F()
379 EXPECT_EQ(flock(self->fd, LOCK_EX | LOCK_NB), -1); in TEST_F()
513 EXPECT_EQ(flock(fd, LOCK_EX | LOCK_NB), -1); in TEST_F()
/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.c219 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
/linux/tools/perf/util/
H A Dbpf_counter.c418 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map()
549 * Use flock() to ensure exclusive access to the perf_event_attr in bperf__load()
651 flock(attr_map_fd, LOCK_UN); in bperf__load()
/linux/fs/fuse/
H A Dfile.c370 if (ra && ff->flock) { in fuse_file_release()
2542 int flock, struct fuse_lk_in *inarg) in fuse_setlk()
2555 if (flock) in fuse_file_lock()
2584 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_file_flock()
2600 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_bmap()
2644 /* emulate flock with POSIX locks */ in fuse_lseek()
2647 ff->flock = true; in fuse_lseek()
3171 .flock = fuse_file_flock,
2484 fuse_lk_fill(struct fuse_args * args,struct file * file,const struct file_lock * fl,int opcode,pid_t pid,int flock,struct fuse_lk_in * inarg) fuse_lk_fill() argument
2526 fuse_setlk(struct file * file,struct file_lock * fl,int flock) fuse_setlk() argument
/linux/fs/nfs/
H A Dnfs4file.c448 .flock = nfs_flock,

123