Searched refs:flock (Results 1 - 25 of 38) sorted by relevance

12

/linux-master/fs/9p/
H A Dvfs_file.c120 struct p9_flock flock; local
136 memset(&flock, 0, sizeof(flock));
140 flock.type = P9_LOCK_TYPE_RDLCK;
143 flock.type = P9_LOCK_TYPE_WRLCK;
146 flock.type = P9_LOCK_TYPE_UNLCK;
149 flock.start = fl->fl_start;
151 flock.length = 0;
153 flock.length = fl->fl_end - fl->fl_start + 1;
154 flock
[all...]
/linux-master/fs/
H A Dfcntl.c335 struct flock flock; local
363 if (copy_from_user(&flock, argp, sizeof(flock)))
365 err = fcntl_getlk(filp, cmd, &flock);
366 if (!err && copy_to_user(argp, &flock, sizeof(flock)))
377 if (copy_from_user(&flock, argp, sizeof(flock)))
379 err = fcntl_setlk(fd, filp, cmd, &flock);
486 struct flock64 flock; local
610 fixup_compat_flock(struct flock *flock) argument
623 struct flock flock; local
[all...]
H A Dlocks.c7 * see the flock(2) man page; for details about the other three, see
12 * If multiple threads attempt to lock the same byte (or flock the same file)
538 /* Verify a "struct flock" and copy it to a "struct file_lock" as a POSIX
542 struct flock *l)
2117 * sys_flock: - flock() system call.
2127 * - %LOCK_MAND -- a 'mandatory' flock. (DEPRECATED)
2131 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
2146 pr_warn_once("%s(%d): Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm, current->pid);
2172 if (f.file->f_op->flock)
2173 error = f.file->f_op->flock(
2238 posix_lock_to_flock(struct flock *flock, struct file_lock *fl) argument
2260 posix_lock_to_flock64(struct flock64 *flock, struct file_lock *fl) argument
2274 fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock) argument
2402 fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd, struct flock *flock) argument
2483 fcntl_getlk64(struct file *filp, unsigned int cmd, struct flock64 *flock) argument
2526 fcntl_setlk64(unsigned int fd, struct file *filp, unsigned int cmd, struct flock64 *flock) argument
[all...]
/linux-master/tools/testing/selftests/filelock/
H A Dofdlocks.c11 static int lock_set(int fd, struct flock *fl)
23 static int lock_get(int fd, struct flock *fl)
38 struct flock fl, fl2;
/linux-master/fs/afs/
H A DMakefile17 flock.o \
/linux-master/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-master/fs/smb/client/
H A Dfile.c1390 * style). If such a lock exists, update the flock structure with its
1391 * properties. Otherwise, set the flock type to F_UNLCK if we can cache brlocks
1397 __u8 type, struct file_lock *flock)
1408 flock->c.flc_flags, &conf_lock,
1411 flock->fl_start = conf_lock->offset;
1412 flock->fl_end = conf_lock->offset + conf_lock->length - 1;
1413 flock->c.flc_pid = conf_lock->pid;
1415 flock->c.flc_type = F_RDLCK;
1417 flock->c.flc_type = F_WRLCK;
1421 flock
1396 cifs_lock_test(struct cifsFileInfo *cfile, __u64 offset, __u64 length, __u8 type, struct file_lock *flock) argument
1493 cifs_posix_lock_test(struct file *file, struct file_lock *flock) argument
1522 cifs_posix_lock_set(struct file *file, struct file_lock *flock) argument
1640 struct file_lock *flock; local
1758 cifs_read_flock(struct file_lock *flock, __u32 *type, int *lock, int *unlock, bool *wait_flag, struct TCP_Server_Info *server) argument
1806 cifs_getlk(struct file *file, struct file_lock *flock, __u32 type, bool wait_flag, bool posix_lck, unsigned int xid) argument
1897 cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, unsigned int xid) argument
2011 cifs_setlk(struct file *file, struct file_lock *flock, __u32 type, bool wait_flag, bool posix_lck, int lock, int unlock, unsigned int xid) argument
2154 cifs_lock(struct file *file, int cmd, struct file_lock *flock) argument
[all...]
H A Dsmb2file.c189 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, argument
198 __u64 length = 1 + flock->fl_end - flock->fl_start;
222 if (flock->fl_start > li->offset ||
223 (flock->fl_start + length) <
228 * flock and OFD lock are associated with an open
231 if (!(flock->c.flc_flags & (FL_FLOCK | FL_OFDLCK)))
/linux-master/arch/arm/kernel/
H A Dsys_oabi-compat.c239 struct flock64 flock; local
251 err = get_oabi_flock(&flock, argp);
254 err = fcntl_getlk64(f.file, cmd, &flock);
256 err = put_oabi_flock(&flock, argp);
265 err = get_oabi_flock(&flock, argp);
268 err = fcntl_setlk64(fd, f.file, cmd, &flock);
/linux-master/include/uapi/asm-generic/
H A Dfcntl.h143 * process. This means that they are inherited across fork() like BSD (flock)
170 /* for old implementation of bsd flock () */
176 /* operations for bsd flock(), also used by the kernel implementation */
187 #define LOCK_MAND 32 /* This is a mandatory flock ... */
195 struct flock { struct
/linux-master/tools/include/uapi/asm-generic/
H A Dfcntl.h143 * process. This means that they are inherited across fork() like BSD (flock)
170 /* for old implementation of bsd flock () */
176 /* operations for bsd flock(), also used by the kernel implementation */
187 #define LOCK_MAND 32 /* This is a mandatory flock ... */
195 struct flock { struct
/linux-master/include/linux/
H A Dfilelock.h77 * POSIX byte range locks, BSD (flock) locks, and leases. It's important to
150 int fcntl_getlk(struct file *, unsigned int, struct flock *);
152 struct flock *);
230 struct flock __user *user)
236 unsigned int cmd, struct flock __user *user)
/linux-master/fs/smb/server/
H A Dvfs.h140 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock);
141 int ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout);
142 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock);
H A Dvfs.c332 struct file_lock *flock; local
340 for_each_file_lock(flock, &ctx->flc_posix) {
342 if (flock->fl_end >= start && end >= flock->fl_start) {
343 if (lock_is_read(flock)) {
349 } else if (lock_is_write(flock)) {
351 if (flock->c.flc_file != filp) {
1846 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock) argument
1848 wait_event(flock->c.flc_wait, !flock
1851 ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout) argument
1858 ksmbd_vfs_posix_lock_unblock(struct file_lock *flock) argument
[all...]
H A Dsmb2pdu.c7062 static int smb2_set_flock_flags(struct file_lock *flock, int flags) argument
7071 flock->c.flc_type = F_RDLCK;
7072 flock->c.flc_flags |= FL_SLEEP;
7077 flock->c.flc_type = F_WRLCK;
7078 flock->c.flc_flags |= FL_SLEEP;
7084 flock->c.flc_type = F_RDLCK;
7090 flock->c.flc_type = F_WRLCK;
7094 flock->c.flc_type = F_UNLCK;
7102 static struct ksmbd_lock *smb2_lock_init(struct file_lock *flock, argument
7113 lock->fl = flock;
7129 struct file_lock *flock = (struct file_lock *)argv[0]; local
7153 struct file_lock *flock = NULL; local
[all...]
/linux-master/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 $<
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-master/drivers/nvme/target/
H A Dfc.c85 spinlock_t flock; member in struct:nvmet_fc_fcp_iod
650 spin_lock_init(&fod->flock);
897 spin_lock(&fod->flock);
906 spin_unlock(&fod->flock);
910 spin_unlock(&fod->flock);
2319 spin_lock_irqsave(&fod->flock, flags);
2321 spin_unlock_irqrestore(&fod->flock, flags);
2362 spin_lock_irqsave(&fod->flock, flags);
2365 spin_unlock_irqrestore(&fod->flock, flags);
2374 spin_lock_irqsave(&fod->flock, flag
[all...]
/linux-master/net/9p/
H A Dclient.c2162 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status) argument
2171 fid->fid, flock->type, flock->flags, flock->start,
2172 flock->length, flock->proc_id, flock->client_id);
2174 req = p9_client_rpc(clnt, P9_TLOCK, "dbdqqds", fid->fid, flock->type,
2175 flock->flags, flock
[all...]
/linux-master/tools/hv/
H A Dhv_kvp_daemon.c134 struct flock fl = {F_WRLCK, SEEK_SET, 0, 0, 0};
146 struct flock fl = {F_UNLCK, SEEK_SET, 0, 0, 0};
/linux-master/include/net/9p/
H A Dclient.h224 int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
/linux-master/tools/power/x86/intel-speed-select/
H A Disst-daemon.c212 if (flock(pid_file_handle, LOCK_EX|LOCK_NB) < 0) {
/linux-master/arch/um/os-Linux/
H A Dfile.c580 struct flock lock = ((struct flock) { .l_type = type,
/linux-master/tools/perf/util/
H A Dbpf_counter.c357 err = flock(map_fd, LOCK_EX);
469 * Use flock() to ensure exclusive access to the perf_event_attr
571 flock(attr_map_fd, LOCK_UN);
/linux-master/kernel/
H A Dsys_ni.c66 COND_SYSCALL(flock); variable
/linux-master/fs/nfs/
H A Dnfs4file.c457 .flock = nfs_flock,

Completed in 625 milliseconds

12