Lines Matching refs:fl
23 void *fl; member
26 int (*callback)(struct file_lock *fl, int result);
105 int cmd, struct file_lock *fl) in dlm_posix_lock() argument
123 op->info.pid = fl->fl_pid; in dlm_posix_lock()
124 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_lock()
128 op->info.start = fl->fl_start; in dlm_posix_lock()
129 op->info.end = fl->fl_end; in dlm_posix_lock()
131 if (fl->fl_lmops && fl->fl_lmops->lm_grant) { in dlm_posix_lock()
141 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_lock()
142 op_data->callback = fl->fl_lmops->lm_grant; in dlm_posix_lock()
144 locks_copy_lock(&op_data->flc, fl); in dlm_posix_lock()
145 op_data->fl = fl; in dlm_posix_lock()
154 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_lock()
185 if (locks_lock_file_wait(file, fl) < 0) in dlm_posix_lock()
202 struct file_lock *fl; in dlm_plock_callback() local
204 int (*notify)(struct file_lock *fl, int result) = NULL; in dlm_plock_callback()
212 fl = op_data->fl; in dlm_plock_callback()
216 notify(fl, op->info.rv); in dlm_plock_callback()
232 (unsigned long long)op->info.number, file, fl); in dlm_plock_callback()
235 rv = notify(fl, 0); in dlm_plock_callback()
249 struct file_lock *fl) in dlm_posix_unlock() argument
254 unsigned char fl_flags = fl->fl_flags; in dlm_posix_unlock()
267 fl->fl_flags |= FL_EXISTS; in dlm_posix_unlock()
269 rv = locks_lock_file_wait(file, fl); in dlm_posix_unlock()
280 op->info.pid = fl->fl_pid; in dlm_posix_unlock()
283 op->info.start = fl->fl_start; in dlm_posix_unlock()
284 op->info.end = fl->fl_end; in dlm_posix_unlock()
285 if (fl->fl_lmops && fl->fl_lmops->lm_grant) in dlm_posix_unlock()
286 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_unlock()
288 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_unlock()
290 if (fl->fl_flags & FL_CLOSE) { in dlm_posix_unlock()
311 fl->fl_flags = fl_flags; in dlm_posix_unlock()
317 struct file_lock *fl) in dlm_posix_get() argument
334 op->info.pid = fl->fl_pid; in dlm_posix_get()
335 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_get()
338 op->info.start = fl->fl_start; in dlm_posix_get()
339 op->info.end = fl->fl_end; in dlm_posix_get()
340 if (fl->fl_lmops && fl->fl_lmops->lm_grant) in dlm_posix_get()
341 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_get()
343 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_get()
355 fl->fl_type = F_UNLCK; in dlm_posix_get()
359 locks_init_lock(fl); in dlm_posix_get()
360 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; in dlm_posix_get()
361 fl->fl_flags = FL_POSIX; in dlm_posix_get()
362 fl->fl_pid = -op->info.pid; in dlm_posix_get()
363 fl->fl_start = op->info.start; in dlm_posix_get()
364 fl->fl_end = op->info.end; in dlm_posix_get()