Lines Matching refs:file_lock
4440 nfsd_break_deleg_cb(struct file_lock *fl) in nfsd_break_deleg_cb()
4461 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
4779 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
4782 struct file_lock *fl; in nfs4_alloc_init_lease()
4804 struct file_lock *fl; in nfs4_set_delegation()
6079 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
6106 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
6135 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
6414 struct file_lock *file_lock = NULL; in nfsd4_lock() local
6415 struct file_lock *conflock = NULL; in nfsd4_lock()
6529 file_lock = &nbl->nbl_lock; in nfsd4_lock()
6530 file_lock->fl_type = fl_type; in nfsd4_lock()
6531 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); in nfsd4_lock()
6532 file_lock->fl_pid = current->tgid; in nfsd4_lock()
6533 file_lock->fl_file = nf->nf_file; in nfsd4_lock()
6534 file_lock->fl_flags = fl_flags; in nfsd4_lock()
6535 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_lock()
6536 file_lock->fl_start = lock->lk_offset; in nfsd4_lock()
6537 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length); in nfsd4_lock()
6538 nfs4_transform_lock_offset(file_lock); in nfsd4_lock()
6555 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, conflock); in nfsd4_lock()
6624 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) in nfsd_test_lock()
6643 struct file_lock *file_lock = NULL; in nfsd4_lockt() local
6663 file_lock = locks_alloc_lock(); in nfsd4_lockt()
6664 if (!file_lock) { in nfsd4_lockt()
6673 file_lock->fl_type = F_RDLCK; in nfsd4_lockt()
6677 file_lock->fl_type = F_WRLCK; in nfsd4_lockt()
6687 file_lock->fl_owner = (fl_owner_t)lo; in nfsd4_lockt()
6688 file_lock->fl_pid = current->tgid; in nfsd4_lockt()
6689 file_lock->fl_flags = FL_POSIX; in nfsd4_lockt()
6691 file_lock->fl_start = lockt->lt_offset; in nfsd4_lockt()
6692 file_lock->fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); in nfsd4_lockt()
6694 nfs4_transform_lock_offset(file_lock); in nfsd4_lockt()
6696 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
6700 if (file_lock->fl_type != F_UNLCK) { in nfsd4_lockt()
6702 nfs4_set_lock_denied(file_lock, &lockt->lt_denied); in nfsd4_lockt()
6707 if (file_lock) in nfsd4_lockt()
6708 locks_free_lock(file_lock); in nfsd4_lockt()
6719 struct file_lock *file_lock = NULL; in nfsd4_locku() local
6741 file_lock = locks_alloc_lock(); in nfsd4_locku()
6742 if (!file_lock) { in nfsd4_locku()
6748 file_lock->fl_type = F_UNLCK; in nfsd4_locku()
6749 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(stp->st_stateowner)); in nfsd4_locku()
6750 file_lock->fl_pid = current->tgid; in nfsd4_locku()
6751 file_lock->fl_file = nf->nf_file; in nfsd4_locku()
6752 file_lock->fl_flags = FL_POSIX; in nfsd4_locku()
6753 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_locku()
6754 file_lock->fl_start = locku->lu_offset; in nfsd4_locku()
6756 file_lock->fl_end = last_byte_offset(locku->lu_offset, in nfsd4_locku()
6758 nfs4_transform_lock_offset(file_lock); in nfsd4_locku()
6760 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, NULL); in nfsd4_locku()
6773 if (file_lock) in nfsd4_locku()
6774 locks_free_lock(file_lock); in nfsd4_locku()
6790 struct file_lock *fl; in check_for_locks()