Lines Matching refs:fl

36 			     int cmd, u8 wait, struct file_lock *fl)  in ceph_lock_message()  argument
56 if (LLONG_MAX == fl->fl_end) in ceph_lock_message()
59 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message()
61 owner = secure_addr(fl->fl_owner); in ceph_lock_message()
65 (int)operation, owner, (u64)fl->fl_pid, fl->fl_start, length, in ceph_lock_message()
66 wait, fl->fl_type); in ceph_lock_message()
71 req->r_args.filelock_change.pid = cpu_to_le64((u64)fl->fl_pid); in ceph_lock_message()
72 req->r_args.filelock_change.start = cpu_to_le64(fl->fl_start); in ceph_lock_message()
82 fl->fl_pid = le64_to_cpu(req->r_reply_info.filelock_reply->pid); in ceph_lock_message()
84 fl->fl_type = F_RDLCK; in ceph_lock_message()
86 fl->fl_type = F_WRLCK; in ceph_lock_message()
88 fl->fl_type = F_UNLCK; in ceph_lock_message()
90 fl->fl_start = le64_to_cpu(req->r_reply_info.filelock_reply->start); in ceph_lock_message()
94 fl->fl_end = length -1; in ceph_lock_message()
96 fl->fl_end = 0; in ceph_lock_message()
102 (int)operation, (u64)fl->fl_pid, fl->fl_start, in ceph_lock_message()
103 length, wait, fl->fl_type, err); in ceph_lock_message()
157 int ceph_lock(struct file *file, int cmd, struct file_lock *fl) in ceph_lock() argument
164 if (!(fl->fl_flags & FL_POSIX)) in ceph_lock()
167 if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) in ceph_lock()
170 dout("ceph_lock, fl_owner: %p", fl->fl_owner); in ceph_lock()
178 if (F_RDLCK == fl->fl_type) in ceph_lock()
180 else if (F_WRLCK == fl->fl_type) in ceph_lock()
185 err = ceph_lock_message(CEPH_LOCK_FCNTL, op, file, lock_cmd, wait, fl); in ceph_lock()
189 err = posix_lock_file(file, fl, NULL); in ceph_lock()
195 CEPH_LOCK_UNLOCK, 0, fl); in ceph_lock()
204 int ceph_flock(struct file *file, int cmd, struct file_lock *fl) in ceph_flock() argument
210 if (!(fl->fl_flags & FL_FLOCK)) in ceph_flock()
213 if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) in ceph_flock()
216 dout("ceph_flock, fl_file: %p", fl->fl_file); in ceph_flock()
221 if (F_RDLCK == fl->fl_type) in ceph_flock()
223 else if (F_WRLCK == fl->fl_type) in ceph_flock()
229 file, lock_cmd, wait, fl); in ceph_flock()
231 err = flock_lock_file_wait(file, fl); in ceph_flock()
235 file, CEPH_LOCK_UNLOCK, 0, fl); in ceph_flock()