Home
last modified time | relevance | path

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

/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()
2188 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument
2220 if (f.file->f_op->flock) in SYSCALL_DEFINE2()
2221 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2()
2284 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument
2286 flock->l_pid = locks_translate_pid(fl, task_active_pid_ns(current)); in posix_lock_to_flock()
2297 flock->l_start = fl->fl_start; in posix_lock_to_flock()
2298 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock()
2300 flock->l_whence = 0; in posix_lock_to_flock()
2301 flock->l_type = fl->fl_type; in posix_lock_to_flock()
[all …]
DKconfig100 for filesystems like NFS and for the flock() system
/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 …]
/fs/cifs/
Dfile.c1035 __u8 type, struct file_lock *flock) in cifs_lock_test() argument
1046 flock->fl_flags, &conf_lock, in cifs_lock_test()
1049 flock->fl_start = conf_lock->offset; in cifs_lock_test()
1050 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test()
1051 flock->fl_pid = conf_lock->pid; in cifs_lock_test()
1053 flock->fl_type = F_RDLCK; in cifs_lock_test()
1055 flock->fl_type = F_WRLCK; in cifs_lock_test()
1059 flock->fl_type = F_UNLCK; in cifs_lock_test()
1130 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument
1134 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()
Dsmb2proto.h114 struct file_lock *flock, const unsigned int xid);
Dcifsproto.h170 struct file_lock *flock, const unsigned int xid);
/fs/afs/
DMakefile19 flock.o \
Dfile.c38 .flock = afs_flock,
/fs/nfs/
Dnfs4file.c277 .flock = nfs_flock,
Dfile.c845 .flock = nfs_flock,
/fs/fuse/
Dfile.c285 if (ff->flock) { in fuse_release_common()
2341 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument
2354 if (flock) in fuse_lk_fill()
2383 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument
2403 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk()
2448 ff->flock = true; in fuse_file_flock()
3349 .flock = fuse_file_flock,
Dfuse_i.h218 bool flock:1; member
/fs/ocfs2/
Dfile.c2675 .flock = ocfs2_flock,
2694 .flock = ocfs2_flock,
2721 .flock = ocfs2_flock,
2739 .flock = ocfs2_flock,
/fs/gfs2/
Dfile.c1329 .flock = gfs2_flock,
1344 .flock = gfs2_flock,
/fs/ceph/
Ddir.c1815 .flock = ceph_flock,
Dfile.c2187 .flock = ceph_flock,