Home
last modified time | relevance | path

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

/fs/
Dfcntl.c335 struct flock flock; in do_fcntl() local
363 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl()
365 err = fcntl_getlk(filp, cmd, &flock); in do_fcntl()
366 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in do_fcntl()
377 if (copy_from_user(&flock, argp, sizeof(flock))) in do_fcntl()
379 err = fcntl_setlk(fd, filp, cmd, &flock); in do_fcntl()
486 struct flock64 flock; in SYSCALL_DEFINE3() local
505 if (copy_from_user(&flock, argp, sizeof(flock))) in SYSCALL_DEFINE3()
507 err = fcntl_getlk64(f.file, cmd, &flock); in SYSCALL_DEFINE3()
508 if (!err && copy_to_user(argp, &flock, sizeof(flock))) in SYSCALL_DEFINE3()
[all …]
Dlocks.c569 struct flock *l) in flock_to_posix_lock()
2126 SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) in SYSCALL_DEFINE2() argument
2158 if (f.file->f_op->flock) in SYSCALL_DEFINE2()
2159 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2()
2222 static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) in posix_lock_to_flock() argument
2224 flock->l_pid = locks_translate_pid(fl, task_active_pid_ns(current)); in posix_lock_to_flock()
2235 flock->l_start = fl->fl_start; in posix_lock_to_flock()
2236 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : in posix_lock_to_flock()
2238 flock->l_whence = 0; in posix_lock_to_flock()
2239 flock->l_type = fl->fl_type; in posix_lock_to_flock()
[all …]
DKconfig116 for filesystems like NFS and for the flock() system
/fs/9p/
Dvfs_file.c134 struct p9_flock flock; in v9fs_file_do_lock() local
152 memset(&flock, 0, sizeof(flock)); in v9fs_file_do_lock()
156 flock.type = P9_LOCK_TYPE_RDLCK; in v9fs_file_do_lock()
159 flock.type = P9_LOCK_TYPE_WRLCK; in v9fs_file_do_lock()
162 flock.type = P9_LOCK_TYPE_UNLCK; in v9fs_file_do_lock()
165 flock.start = fl->fl_start; in v9fs_file_do_lock()
167 flock.length = 0; in v9fs_file_do_lock()
169 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock()
170 flock.proc_id = fl->fl_pid; in v9fs_file_do_lock()
171 flock.client_id = fid->clnt->name; in v9fs_file_do_lock()
[all …]
/fs/cifs/
Dfile.c1106 __u8 type, struct file_lock *flock) in cifs_lock_test() argument
1117 flock->fl_flags, &conf_lock, in cifs_lock_test()
1120 flock->fl_start = conf_lock->offset; in cifs_lock_test()
1121 flock->fl_end = conf_lock->offset + conf_lock->length - 1; in cifs_lock_test()
1122 flock->fl_pid = conf_lock->pid; in cifs_lock_test()
1124 flock->fl_type = F_RDLCK; in cifs_lock_test()
1126 flock->fl_type = F_WRLCK; in cifs_lock_test()
1130 flock->fl_type = F_UNLCK; in cifs_lock_test()
1201 cifs_posix_lock_test(struct file *file, struct file_lock *flock) in cifs_posix_lock_test() argument
1205 unsigned char saved_type = flock->fl_type; in cifs_posix_lock_test()
[all …]
Dsmb2file.c104 smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, in smb2_unlock_range() argument
113 __u64 length = 1 + flock->fl_end - flock->fl_start; in smb2_unlock_range()
137 if (flock->fl_start > li->offset || in smb2_unlock_range()
138 (flock->fl_start + length) < in smb2_unlock_range()
146 if (!(flock->fl_flags & (FL_FLOCK | FL_OFDLCK))) in smb2_unlock_range()
Dcifsfs.c1306 .flock = cifs_flock,
1326 .flock = cifs_flock,
1346 .flock = cifs_flock,
Dsmb2proto.h112 struct file_lock *flock, const unsigned int xid);
Dcifsproto.h177 struct file_lock *flock, const unsigned int xid);
/fs/ksmbd/
Dvfs.c328 struct file_lock *flock; in check_lock_range() local
336 list_for_each_entry(flock, &ctx->flc_posix, fl_list) { in check_lock_range()
338 if (flock->fl_end >= start && end >= flock->fl_start) { in check_lock_range()
339 if (flock->fl_type == F_RDLCK) { in check_lock_range()
345 } else if (flock->fl_type == F_WRLCK) { in check_lock_range()
347 if (flock->fl_file != filp) { in check_lock_range()
1821 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock) in ksmbd_vfs_posix_lock_wait() argument
1823 wait_event(flock->fl_wait, !flock->fl_blocker); in ksmbd_vfs_posix_lock_wait()
1826 int ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout) in ksmbd_vfs_posix_lock_wait_timeout() argument
1828 return wait_event_interruptible_timeout(flock->fl_wait, in ksmbd_vfs_posix_lock_wait_timeout()
[all …]
Dvfs.h179 void ksmbd_vfs_posix_lock_wait(struct file_lock *flock);
180 int ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout);
181 void ksmbd_vfs_posix_lock_unblock(struct file_lock *flock);
Dsmb2pdu.c6776 static int smb2_set_flock_flags(struct file_lock *flock, int flags) in smb2_set_flock_flags() argument
6785 flock->fl_type = F_RDLCK; in smb2_set_flock_flags()
6786 flock->fl_flags |= FL_SLEEP; in smb2_set_flock_flags()
6791 flock->fl_type = F_WRLCK; in smb2_set_flock_flags()
6792 flock->fl_flags |= FL_SLEEP; in smb2_set_flock_flags()
6798 flock->fl_type = F_RDLCK; in smb2_set_flock_flags()
6804 flock->fl_type = F_WRLCK; in smb2_set_flock_flags()
6808 flock->fl_type = F_UNLCK; in smb2_set_flock_flags()
6816 static struct ksmbd_lock *smb2_lock_init(struct file_lock *flock, in smb2_lock_init() argument
6827 lock->fl = flock; in smb2_lock_init()
[all …]
/fs/afs/
DMakefile19 flock.o \
Dfile.c43 .flock = afs_flock,
/fs/fuse/
Dfile.c348 if (ff->flock) { in fuse_file_release()
2590 int flock, struct fuse_lk_in *inarg) in fuse_lk_fill() argument
2603 if (flock) in fuse_lk_fill()
2632 static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) in fuse_setlk() argument
2652 fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg); in fuse_setlk()
2703 ff->flock = true; in fuse_file_flock()
3327 .flock = fuse_file_flock,
Dbacking.c995 if (backing_file->f_op->flock) in fuse_file_flock_backing()
996 error = backing_file->f_op->flock(backing_file, cmd, fl); in fuse_file_flock_backing()
Dfuse_i.h323 bool flock:1; member
/fs/nfs/
Dnfs4file.c461 .flock = nfs_flock,
Dfile.c874 .flock = nfs_flock,
/fs/ocfs2/
Dfile.c2755 .flock = ocfs2_flock,
2774 .flock = ocfs2_flock,
2801 .flock = ocfs2_flock,
2819 .flock = ocfs2_flock,
/fs/gfs2/
Dfile.c1577 .flock = gfs2_flock,
1592 .flock = gfs2_flock,
/fs/ceph/
Ddir.c1959 .flock = ceph_flock,
Dfile.c2531 .flock = ceph_flock,