Lines Matching refs:fl
30 int (*callback)(struct file_lock *fl, int result);
31 void *fl; member
78 struct file *file, struct file_lock *fl) in do_unlock_close() argument
87 op->info.pid = fl->fl_pid; in do_unlock_close()
92 if (fl->fl_lmops && fl->fl_lmops->lm_grant) in do_unlock_close()
93 op->info.owner = (__u64) fl->fl_pid; in do_unlock_close()
95 op->info.owner = (__u64)(long) fl->fl_owner; in do_unlock_close()
102 int cmd, struct file_lock *fl) in dlm_posix_lock() argument
121 op->info.pid = fl->fl_pid; in dlm_posix_lock()
122 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_lock()
126 op->info.start = fl->fl_start; in dlm_posix_lock()
127 op->info.end = fl->fl_end; in dlm_posix_lock()
128 if (fl->fl_lmops && fl->fl_lmops->lm_grant) { in dlm_posix_lock()
131 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_lock()
132 xop->callback = fl->fl_lmops->lm_grant; in dlm_posix_lock()
134 locks_copy_lock(&xop->flc, fl); in dlm_posix_lock()
135 xop->fl = fl; in dlm_posix_lock()
138 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_lock()
153 do_unlock_close(ls, number, file, fl); in dlm_posix_lock()
172 if (locks_lock_file_wait(file, fl) < 0) in dlm_posix_lock()
188 struct file_lock *fl; in dlm_plock_callback() local
190 int (*notify)(struct file_lock *fl, int result) = NULL; in dlm_plock_callback()
205 fl = xop->fl; in dlm_plock_callback()
209 notify(fl, op->info.rv); in dlm_plock_callback()
225 (unsigned long long)op->info.number, file, fl); in dlm_plock_callback()
228 rv = notify(fl, 0); in dlm_plock_callback()
242 struct file_lock *fl) in dlm_posix_unlock() argument
247 unsigned char fl_flags = fl->fl_flags; in dlm_posix_unlock()
260 fl->fl_flags |= FL_EXISTS; in dlm_posix_unlock()
262 rv = locks_lock_file_wait(file, fl); in dlm_posix_unlock()
273 op->info.pid = fl->fl_pid; in dlm_posix_unlock()
276 op->info.start = fl->fl_start; in dlm_posix_unlock()
277 op->info.end = fl->fl_end; in dlm_posix_unlock()
278 if (fl->fl_lmops && fl->fl_lmops->lm_grant) in dlm_posix_unlock()
279 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_unlock()
281 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_unlock()
283 if (fl->fl_flags & FL_CLOSE) { in dlm_posix_unlock()
310 fl->fl_flags = fl_flags; in dlm_posix_unlock()
316 struct file_lock *fl) in dlm_posix_get() argument
333 op->info.pid = fl->fl_pid; in dlm_posix_get()
334 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_get()
337 op->info.start = fl->fl_start; in dlm_posix_get()
338 op->info.end = fl->fl_end; in dlm_posix_get()
339 if (fl->fl_lmops && fl->fl_lmops->lm_grant) in dlm_posix_get()
340 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_get()
342 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_get()
360 fl->fl_type = F_UNLCK; in dlm_posix_get()
364 locks_init_lock(fl); in dlm_posix_get()
365 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; in dlm_posix_get()
366 fl->fl_flags = FL_POSIX; in dlm_posix_get()
367 fl->fl_pid = -op->info.pid; in dlm_posix_get()
368 fl->fl_start = op->info.start; in dlm_posix_get()
369 fl->fl_end = op->info.end; in dlm_posix_get()