| /fs/ |
| A D | locks.c | 277 if (fl) in locks_alloc_lock() 308 fl->fl_ops->fl_release_private(fl); in locks_release_private() 388 memset(fl, 0, sizeof(*fl)); in locks_init_lease() 427 fl->fl_ops->fl_copy_lock(new, fl); in locks_copy_lock() 518 fl->fl_end = fl->fl_start + (l->l_len - 1); in flock64_to_posix_lock() 523 fl->fl_end = fl->fl_start - 1; in flock64_to_posix_lock() 713 fl->fl_lmops->lm_notify(fl); in __locks_wake_up_blocks() 1592 if (fl->fl_lmops->lm_break(fl)) in __break_lease() 2252 fl->fl_end - fl->fl_start + 1; in posix_lock_to_flock() 2264 fl->fl_end - fl->fl_start + 1; in posix_lock_to_flock64() [all …]
|
| A D | fcntl.c | 655 struct compat_flock fl; in get_compat_flock() local 659 copy_flock_fields(kfl, &fl); in get_compat_flock() 665 struct compat_flock64 fl; in get_compat_flock64() local 669 copy_flock_fields(kfl, &fl); in get_compat_flock64() 675 struct compat_flock fl; in put_compat_flock() local 677 memset(&fl, 0, sizeof(struct compat_flock)); in put_compat_flock() 678 copy_flock_fields(&fl, kfl); in put_compat_flock() 679 if (copy_to_user(ufl, &fl, sizeof(struct compat_flock))) in put_compat_flock() 686 struct compat_flock64 fl; in put_compat_flock64() local 691 memset(&fl, 0, sizeof(struct compat_flock64)); in put_compat_flock64() [all …]
|
| /fs/afs/ |
| A D | flock.c | 466 fl->fl_start, fl->fl_end, fl->c.flc_type, mode); in afs_do_setlk() 472 partial = (fl->fl_start != 0 || fl->fl_end != OFFSET_MAX); in afs_do_setlk() 647 if (fl->fl_u.afs.state >= 0 && fl->fl_u.afs.state != AFS_LOCK_GRANTED) { in afs_do_setlk() 707 fl->c.flc_type); in afs_do_unlk() 749 fl->fl_start = 0; in afs_do_getlk() 751 fl->c.flc_pid = 0; in afs_do_getlk() 772 fl->c.flc_type, fl->c.flc_flags, in afs_lock() 773 (long long) fl->fl_start, (long long) fl->fl_end); in afs_lock() 781 if (lock_is_unlock(fl)) in afs_lock() 807 fl->c.flc_type, fl->c.flc_flags); in afs_flock() [all …]
|
| /fs/lockd/ |
| A D | clntproc.c | 144 lock->fl.fl_start = fl->fl_start; in nlmclnt_setlockargs() 145 lock->fl.fl_end = fl->fl_end; in nlmclnt_setlockargs() 146 lock->fl.c.flc_type = fl->c.flc_type; in nlmclnt_setlockargs() 195 fl->fl_ops->fl_release_private(fl); in nlmclnt_proc() 196 fl->fl_ops = NULL; in nlmclnt_proc() 449 fl->fl_start = req->a_res.lock.fl.fl_start; in nlmclnt_test() 450 fl->fl_end = req->a_res.lock.fl.fl_end; in nlmclnt_test() 451 fl->c.flc_type = req->a_res.lock.fl.c.flc_type; in nlmclnt_test() 452 fl->c.flc_pid = -req->a_res.lock.fl.c.flc_pid; in nlmclnt_test() 498 return locks_lock_file_wait(fl->c.flc_file, fl); in do_vfs_lock() [all …]
|
| A D | svclock.c | 158 fl = &block->b_call->a_args.lock.fl; in nlmsvc_lookup_block() 162 (long long)fl->fl_end, fl->c.flc_type, in nlmsvc_lookup_block() 164 if (block->b_file == file && nlm_compare_locks(fl, &lock->fl)) { in nlmsvc_lookup_block() 421 locks_copy_lock(&call->a_args.lock.fl, &lock->fl); in nlmsvc_setgrantargs() 646 lock->fl.c.flc_type, (long long)lock->fl.fl_start, in nlmsvc_testlock() 652 conflock->fl.c.flc_type = lock->fl.c.flc_type; in nlmsvc_testlock() 653 conflock->fl.fl_start = lock->fl.fl_start; in nlmsvc_testlock() 654 conflock->fl.fl_end = lock->fl.fl_end; in nlmsvc_testlock() 725 struct file_lock *fl = &block->b_call->a_args.lock.fl; in nlmsvc_cancel_blocked() local 996 fl = &block->b_call->a_args.lock.fl; in nlmsvc_grant_reply() [all …]
|
| A D | xdr4.c | 40 fl->fl_start = off; in nlm4svc_set_file_lock_range() 42 fl->fl_end = OFFSET_MAX; in nlm4svc_set_file_lock_range() 44 fl->fl_end = end; in nlm4svc_set_file_lock_range() 76 struct file_lock *fl = &lock->fl; in svcxdr_decode_lock() local 91 locks_init_lock(fl); in svcxdr_decode_lock() 92 fl->c.flc_type = F_RDLCK; in svcxdr_decode_lock() 100 const struct file_lock *fl = &lock->fl; in svcxdr_encode_holder() local 110 start = loff_t_to_s64(fl->fl_start); in svcxdr_encode_holder() 111 if (fl->fl_end == OFFSET_MAX) in svcxdr_encode_holder() 114 len = loff_t_to_s64(fl->fl_end - fl->fl_start + 1); in svcxdr_encode_holder() [all …]
|
| A D | xdr.c | 74 struct file_lock *fl = &lock->fl; in svcxdr_decode_lock() local 90 locks_init_lock(fl); in svcxdr_decode_lock() 91 fl->c.flc_flags = FL_POSIX; in svcxdr_decode_lock() 92 fl->c.flc_type = F_RDLCK; in svcxdr_decode_lock() 94 fl->fl_start = s32_to_loff_t(start); in svcxdr_decode_lock() 96 fl->fl_end = OFFSET_MAX; in svcxdr_decode_lock() 98 fl->fl_end = s32_to_loff_t(end); in svcxdr_decode_lock() 106 const struct file_lock *fl = &lock->fl; in svcxdr_encode_holder() local 117 if (fl->fl_end == OFFSET_MAX) in svcxdr_encode_holder() 120 len = loff_t_to_s32(fl->fl_end - fl->fl_start + 1); in svcxdr_encode_holder() [all …]
|
| A D | clntxdr.c | 65 const struct file_lock *fl = &lock->fl; in nlm_compute_offsets() local 67 *l_offset = loff_t_to_s32(fl->fl_start); in nlm_compute_offsets() 68 if (fl->fl_end == OFFSET_MAX) in nlm_compute_offsets() 71 *l_len = loff_t_to_s32(fl->fl_end - fl->fl_start + 1); in nlm_compute_offsets() 255 struct file_lock *fl = &lock->fl; in decode_nlm_holder() local 262 locks_init_lock(fl); in decode_nlm_holder() 269 fl->c.flc_pid = (pid_t)lock->svid; in decode_nlm_holder() 279 fl->c.flc_flags = FL_POSIX; in decode_nlm_holder() 285 fl->fl_start = (loff_t)l_offset; in decode_nlm_holder() 287 fl->fl_end = OFFSET_MAX; in decode_nlm_holder() [all …]
|
| A D | clntlock.c | 88 void nlmclnt_prepare_block(struct nlm_wait *block, struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block() argument 91 block->b_lock = fl; in nlmclnt_prepare_block() 163 const struct file_lock *fl = &lock->fl; in nlmclnt_grant() local 176 if (fl_blocked->fl_start != fl->fl_start) in nlmclnt_grant() 178 if (fl_blocked->fl_end != fl->fl_end) in nlmclnt_grant() 232 struct file_lock *fl, *next; in reclaimer() local 258 list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) { in reclaimer() 259 list_del_init(&fl->fl_u.nfs_fl.list); in reclaimer() 269 if (nlmclnt_reclaim(host, fl, req) != 0) in reclaimer() 271 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); in reclaimer()
|
| A D | clnt4xdr.c | 68 const struct file_lock *fl = &lock->fl; in nlm4_compute_offsets() local 70 *l_offset = loff_t_to_s64(fl->fl_start); in nlm4_compute_offsets() 71 if (fl->fl_end == OFFSET_MAX) in nlm4_compute_offsets() 74 *l_len = loff_t_to_s64(fl->fl_end - fl->fl_start + 1); in nlm4_compute_offsets() 246 encode_bool(xdr, lock->fl.c.flc_type == F_RDLCK); in encode_nlm4_holder() 259 struct file_lock *fl = &lock->fl; in decode_nlm4_holder() local 266 locks_init_lock(fl); in decode_nlm4_holder() 273 fl->c.flc_pid = (pid_t)lock->svid; in decode_nlm4_holder() 283 fl->c.flc_flags = FL_POSIX; in decode_nlm4_holder() 287 nlm4svc_set_file_lock_range(fl, l_offset, l_len); in decode_nlm4_holder() [all …]
|
| A D | svcsubs.c | 116 mode = lock_to_openmode(&lock->fl); in nlm_lookup_file() 187 lock.c.flc_owner = fl->c.flc_owner; in nlm_unlock_files() 188 lock.c.flc_pid = fl->c.flc_pid; in nlm_unlock_files() 212 struct file_lock *fl; in nlm_traverse_locks() local 221 for_each_file_lock(fl, &flctx->flc_posix) { in nlm_traverse_locks() 222 if (fl->fl_lmops != &nlmsvc_lock_operations) in nlm_traverse_locks() 228 lockhost = ((struct nlm_lockowner *) fl->c.flc_owner)->host; in nlm_traverse_locks() 232 if (nlm_unlock_files(file, fl)) in nlm_traverse_locks() 267 struct file_lock *fl; in nlm_file_inuse() local 275 for_each_file_lock(fl, &flctx->flc_posix) { in nlm_file_inuse() [all …]
|
| A D | svc4proc.c | 47 int mode = lock_to_openmode(&lock->fl); in nlm4svc_retrieve_args() 49 lock->fl.c.flc_flags = FL_POSIX; in nlm4svc_retrieve_args() 57 lock->fl.c.flc_file = file->f_file[mode]; in nlm4svc_retrieve_args() 58 lock->fl.c.flc_pid = current->tgid; in nlm4svc_retrieve_args() 59 lock->fl.fl_start = (loff_t)lock->lock_start; in nlm4svc_retrieve_args() 60 lock->fl.fl_end = lock->lock_len ? in nlm4svc_retrieve_args() 63 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlm4svc_retrieve_args() 64 nlmsvc_locks_init_private(&lock->fl, host, (pid_t)lock->svid); in nlm4svc_retrieve_args() 65 if (!lock->fl.c.flc_owner) { in nlm4svc_retrieve_args() 110 test_owner = argp->lock.fl.c.flc_owner; in __nlm4svc_proc_test()
|
| A D | svcproc.c | 79 mode = lock_to_openmode(&lock->fl); in nlmsvc_retrieve_args() 80 lock->fl.c.flc_flags = FL_POSIX; in nlmsvc_retrieve_args() 81 lock->fl.c.flc_file = file->f_file[mode]; in nlmsvc_retrieve_args() 82 lock->fl.c.flc_pid = current->tgid; in nlmsvc_retrieve_args() 83 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlmsvc_retrieve_args() 84 nlmsvc_locks_init_private(&lock->fl, host, (pid_t)lock->svid); in nlmsvc_retrieve_args() 85 if (!lock->fl.c.flc_owner) { in nlmsvc_retrieve_args() 130 test_owner = argp->lock.fl.c.flc_owner; in __nlmsvc_proc_test()
|
| /fs/ceph/ |
| A D | locks.c | 64 fl->fl_u.ceph.inode = NULL; in ceph_fl_release_lock() 94 fl->fl_ops->fl_copy_lock(fl, NULL); in ceph_lock_message() 111 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message() 118 (u64) fl->c.flc_pid, in ceph_lock_message() 119 fl->fl_start, length, wait, fl->c.flc_type); in ceph_lock_message() 146 fl->fl_end = length -1; in ceph_lock_message() 148 fl->fl_end = 0; in ceph_lock_message() 155 fl->fl_start, length, wait, fl->c.flc_type, err); in ceph_lock_message() 282 if (lock_is_read(fl)) in ceph_lock() 337 if (lock_is_unlock(fl)) in ceph_flock() [all …]
|
| A D | util.c | 34 fl->stripe_unit = le32_to_cpu(legacy->fl_stripe_unit); in ceph_file_layout_from_legacy() 35 fl->stripe_count = le32_to_cpu(legacy->fl_stripe_count); in ceph_file_layout_from_legacy() 36 fl->object_size = le32_to_cpu(legacy->fl_object_size); in ceph_file_layout_from_legacy() 37 fl->pool_id = le32_to_cpu(legacy->fl_pg_pool); in ceph_file_layout_from_legacy() 38 if (fl->pool_id == 0 && fl->stripe_unit == 0 && in ceph_file_layout_from_legacy() 39 fl->stripe_count == 0 && fl->object_size == 0) in ceph_file_layout_from_legacy() 40 fl->pool_id = -1; in ceph_file_layout_from_legacy() 46 legacy->fl_stripe_unit = cpu_to_le32(fl->stripe_unit); in ceph_file_layout_to_legacy() 48 legacy->fl_object_size = cpu_to_le32(fl->object_size); in ceph_file_layout_to_legacy() 49 if (fl->pool_id >= 0) in ceph_file_layout_to_legacy() [all …]
|
| /fs/dlm/ |
| A D | plock.c | 26 void *fl; member 150 if (fl->fl_lmops && fl->fl_lmops->lm_grant) { in dlm_posix_lock() 161 op_data->fl = fl; in dlm_posix_lock() 242 struct file_lock *fl; in dlm_plock_callback() local 252 fl = op_data->fl; in dlm_plock_callback() 275 rv = notify(fl, 0); in dlm_plock_callback() 370 if (WARN_ON_ONCE(!fl->fl_lmops || !fl->fl_lmops->lm_grant)) in dlm_posix_cancel() 384 info.end = fl->fl_end; in dlm_posix_cancel() 423 struct file_lock *fl) in dlm_posix_get() argument 462 locks_init_lock(fl); in dlm_posix_get() [all …]
|
| /fs/9p/ |
| A D | vfs_file.c | 138 switch (fl->c.flc_type) { in v9fs_file_do_lock() 153 flock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_do_lock() 212 fl->c.flc_type = F_UNLCK; in v9fs_file_do_lock() 215 fl->c.flc_type = type; in v9fs_file_do_lock() 232 posix_test_lock(filp, fl); in v9fs_file_getlock() 247 glock.length = fl->fl_end - fl->fl_start + 1; in v9fs_file_getlock() 257 fl->c.flc_type = F_RDLCK; in v9fs_file_getlock() 260 fl->c.flc_type = F_WRLCK; in v9fs_file_getlock() 294 filp, cmd, fl, filp); in v9fs_file_lock_dotl() 319 struct file_lock *fl) in v9fs_file_flock_dotl() argument [all …]
|
| /fs/nfs/filelayout/ |
| A D | filelayout.c | 568 fl->num_fh > 1 && fl->num_fh != dsaddr->ds_num) || in filelayout_check_deviceid() 630 if (fl->fh_array) { in _filelayout_free_lseg() 638 kfree(fl); in _filelayout_free_lseg() 669 memcpy(&fl->deviceid, p, sizeof(fl->deviceid)); in filelayout_decode_layout() 687 __func__, nfl_util, fl->num_fh, fl->first_stripe_index, in filelayout_decode_layout() 692 if (fl->num_fh > in filelayout_decode_layout() 697 fl->fh_array = kcalloc(fl->num_fh, sizeof(fl->fh_array[0]), in filelayout_decode_layout() 722 memcpy(fl->fh_array[i]->data, p, fl->fh_array[i]->size); in filelayout_decode_layout() 766 fl = kzalloc(sizeof(*fl), gfp_flags); in filelayout_alloc_lseg() 767 if (!fl) in filelayout_alloc_lseg() [all …]
|
| /fs/ocfs2/ |
| A D | locks.c | 24 int cmd, struct file_lock *fl) in ocfs2_do_flock() argument 30 if (lock_is_write(fl)) in ocfs2_do_flock() 72 ret = locks_lock_file_wait(file, fl); in ocfs2_do_flock() 89 ret = locks_lock_file_wait(file, fl); in ocfs2_do_funlock() 103 if (!(fl->c.flc_flags & FL_FLOCK)) in ocfs2_flock() 108 return locks_lock_file_wait(file, fl); in ocfs2_flock() 110 if (lock_is_unlock(fl)) in ocfs2_flock() 111 return ocfs2_do_funlock(file, cmd, fl); in ocfs2_flock() 113 return ocfs2_do_flock(file, inode, cmd, fl); in ocfs2_flock() 116 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_lock() argument [all …]
|
| A D | locks.h | 13 int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl); 14 int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
|
| /fs/nfsd/ |
| A D | flexfilelayout.c | 31 struct pnfs_ff_layout *fl; in nfsd4_ff_proc_layoutget() local 39 fl = kzalloc(sizeof(*fl), GFP_KERNEL); in nfsd4_ff_proc_layoutget() 40 if (!fl) in nfsd4_ff_proc_layoutget() 42 args->lg_content = fl; in nfsd4_ff_proc_layoutget() 49 fl->flags = FF_FLAGS_NO_LAYOUTCOMMIT | FF_FLAGS_NO_IO_THRU_MDS | in nfsd4_ff_proc_layoutget() 55 fl->uid = make_kuid(&init_user_ns, u); in nfsd4_ff_proc_layoutget() 57 fl->uid = inode->i_uid; in nfsd4_ff_proc_layoutget() 58 fl->gid = inode->i_gid; in nfsd4_ff_proc_layoutget() 60 error = nfsd4_set_deviceid(&fl->deviceid, fhp, device_generation); in nfsd4_ff_proc_layoutget() 64 fl->fh.size = fhp->fh_handle.fh_size; in nfsd4_ff_proc_layoutget() [all …]
|
| A D | flexfilelayoutxdr.c | 22 const struct pnfs_ff_layout *fl = lgp->lg_content; in nfsd4_ff_encode_layoutget() local 33 fh_len = 4 + fl->fh.size; in nfsd4_ff_encode_layoutget() 35 uid.len = sprintf(uid.buf, "%u", from_kuid(&init_user_ns, fl->uid)); in nfsd4_ff_encode_layoutget() 36 gid.len = sprintf(gid.buf, "%u", from_kgid(&init_user_ns, fl->gid)); in nfsd4_ff_encode_layoutget() 57 p = xdr_encode_opaque_fixed(p, &fl->deviceid, in nfsd4_ff_encode_layoutget() 62 *p++ = cpu_to_be32(fl->stateid.si_generation); in nfsd4_ff_encode_layoutget() 63 p = xdr_encode_opaque_fixed(p, &fl->stateid.si_opaque, in nfsd4_ff_encode_layoutget() 67 p = xdr_encode_opaque(p, fl->fh.data, fl->fh.size); in nfsd4_ff_encode_layoutget() 72 *p++ = cpu_to_be32(fl->flags); in nfsd4_ff_encode_layoutget()
|
| A D | nfs4layouts.c | 157 struct nfsd_file *fl; in nfsd4_close_layout() local 160 fl = ls->ls_file; in nfsd4_close_layout() 164 if (fl) { in nfsd4_close_layout() 168 nfsd_file_put(fl); in nfsd4_close_layout() 200 struct file_lease *fl; in nfsd4_layout_setlease() local 207 if (!fl) in nfsd4_layout_setlease() 209 locks_init_lease(fl); in nfsd4_layout_setlease() 213 fl->c.flc_owner = ls; in nfsd4_layout_setlease() 217 status = kernel_setlease(fl->c.flc_file, fl->c.flc_type, &fl, NULL); in nfsd4_layout_setlease() 222 BUG_ON(fl != NULL); in nfsd4_layout_setlease() [all …]
|
| /fs/nfs/ |
| A D | file.c | 742 posix_test_lock(filp, fl); in do_getlk() 743 if (fl->c.flc_type != F_UNLCK) { in do_getlk() 747 fl->c.flc_type = saved_type; in do_getlk() 759 fl->c.flc_type = F_UNLCK; in do_getlk() 851 filp, fl->c.flc_type, fl->c.flc_flags, in nfs_lock() 852 (long long)fl->fl_start, (long long)fl->fl_end); in nfs_lock() 856 if (fl->c.flc_flags & FL_RECLAIM) in nfs_lock() 870 else if (lock_is_unlock(fl)) in nfs_lock() 888 filp, fl->c.flc_type, fl->c.flc_flags); in nfs_flock() 890 if (!(fl->c.flc_flags & FL_FLOCK)) in nfs_flock() [all …]
|
| /fs/gfs2/ |
| A D | file.c | 1446 if (!(fl->c.flc_flags & FL_POSIX)) in gfs2_lock() 1449 if (lock_is_unlock(fl)) in gfs2_lock() 1450 locks_lock_file_wait(file, fl); in gfs2_lock() 1456 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); in gfs2_lock() 1457 else if (lock_is_unlock(fl)) in gfs2_lock() 1529 error = locks_lock_file_wait(file, fl); in do_flock() 1544 locks_lock_file_wait(file, fl); in do_unflock() 1563 if (!(fl->c.flc_flags & FL_FLOCK)) in gfs2_flock() 1566 if (lock_is_unlock(fl)) { in gfs2_flock() 1567 do_unflock(file, fl); in gfs2_flock() [all …]
|