Lines Matching refs:file_lock

4590 nfsd_break_deleg_cb(struct file_lock *fl)  in nfsd_break_deleg_cb()
4620 static bool nfsd_breaker_owns_lease(struct file_lock *fl) in nfsd_breaker_owns_lease()
4637 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
4962 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
4965 struct file_lock *fl; in nfs4_alloc_init_lease()
4987 struct file_lock *fl; in nfs4_set_delegation()
6342 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
6369 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
6398 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
6681 struct file_lock *file_lock = NULL; in nfsd4_lock() local
6682 struct file_lock *conflock = NULL; in nfsd4_lock()
6796 file_lock = &nbl->nbl_lock; in nfsd4_lock()
6797 file_lock->fl_type = fl_type; in nfsd4_lock()
6798 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); in nfsd4_lock()
6799 file_lock->fl_pid = current->tgid; in nfsd4_lock()
6800 file_lock->fl_file = nf->nf_file; in nfsd4_lock()
6801 file_lock->fl_flags = fl_flags; in nfsd4_lock()
6802 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_lock()
6803 file_lock->fl_start = lock->lk_offset; in nfsd4_lock()
6804 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length); in nfsd4_lock()
6805 nfs4_transform_lock_offset(file_lock); in nfsd4_lock()
6822 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, conflock); in nfsd4_lock()
6890 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) in nfsd_test_lock()
6920 struct file_lock *file_lock = NULL; in nfsd4_lockt() local
6941 file_lock = locks_alloc_lock(); in nfsd4_lockt()
6942 if (!file_lock) { in nfsd4_lockt()
6951 file_lock->fl_type = F_RDLCK; in nfsd4_lockt()
6955 file_lock->fl_type = F_WRLCK; in nfsd4_lockt()
6965 file_lock->fl_owner = (fl_owner_t)lo; in nfsd4_lockt()
6966 file_lock->fl_pid = current->tgid; in nfsd4_lockt()
6967 file_lock->fl_flags = FL_POSIX; in nfsd4_lockt()
6969 file_lock->fl_start = lockt->lt_offset; in nfsd4_lockt()
6970 file_lock->fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); in nfsd4_lockt()
6972 nfs4_transform_lock_offset(file_lock); in nfsd4_lockt()
6974 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
6978 if (file_lock->fl_type != F_UNLCK) { in nfsd4_lockt()
6980 nfs4_set_lock_denied(file_lock, &lockt->lt_denied); in nfsd4_lockt()
6985 if (file_lock) in nfsd4_lockt()
6986 locks_free_lock(file_lock); in nfsd4_lockt()
6997 struct file_lock *file_lock = NULL; in nfsd4_locku() local
7019 file_lock = locks_alloc_lock(); in nfsd4_locku()
7020 if (!file_lock) { in nfsd4_locku()
7026 file_lock->fl_type = F_UNLCK; in nfsd4_locku()
7027 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(stp->st_stateowner)); in nfsd4_locku()
7028 file_lock->fl_pid = current->tgid; in nfsd4_locku()
7029 file_lock->fl_file = nf->nf_file; in nfsd4_locku()
7030 file_lock->fl_flags = FL_POSIX; in nfsd4_locku()
7031 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_locku()
7032 file_lock->fl_start = locku->lu_offset; in nfsd4_locku()
7034 file_lock->fl_end = last_byte_offset(locku->lu_offset, in nfsd4_locku()
7036 nfs4_transform_lock_offset(file_lock); in nfsd4_locku()
7038 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, NULL); in nfsd4_locku()
7051 if (file_lock) in nfsd4_locku()
7052 locks_free_lock(file_lock); in nfsd4_locku()
7068 struct file_lock *fl; in check_for_locks()