Lines Matching refs:file_lock

4672 nfsd_break_deleg_cb(struct file_lock *fl)  in nfsd_break_deleg_cb()
4694 static bool nfsd_breaker_owns_lease(struct file_lock *fl) in nfsd_breaker_owns_lease()
4711 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
5031 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
5034 struct file_lock *fl; in nfs4_alloc_init_lease()
5115 struct file_lock *fl; in nfs4_set_delegation()
6496 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
6523 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
6554 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
6837 struct file_lock *file_lock = NULL; in nfsd4_lock() local
6838 struct file_lock *conflock = NULL; in nfsd4_lock()
6955 file_lock = &nbl->nbl_lock; in nfsd4_lock()
6956 file_lock->fl_type = fl_type; in nfsd4_lock()
6957 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); in nfsd4_lock()
6958 file_lock->fl_pid = current->tgid; in nfsd4_lock()
6959 file_lock->fl_file = nf->nf_file; in nfsd4_lock()
6960 file_lock->fl_flags = fl_flags; in nfsd4_lock()
6961 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_lock()
6962 file_lock->fl_start = lock->lk_offset; in nfsd4_lock()
6963 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length); in nfsd4_lock()
6964 nfs4_transform_lock_offset(file_lock); in nfsd4_lock()
6981 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, conflock); in nfsd4_lock()
7049 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) in nfsd_test_lock()
7079 struct file_lock *file_lock = NULL; in nfsd4_lockt() local
7099 file_lock = locks_alloc_lock(); in nfsd4_lockt()
7100 if (!file_lock) { in nfsd4_lockt()
7109 file_lock->fl_type = F_RDLCK; in nfsd4_lockt()
7113 file_lock->fl_type = F_WRLCK; in nfsd4_lockt()
7123 file_lock->fl_owner = (fl_owner_t)lo; in nfsd4_lockt()
7124 file_lock->fl_pid = current->tgid; in nfsd4_lockt()
7125 file_lock->fl_flags = FL_POSIX; in nfsd4_lockt()
7127 file_lock->fl_start = lockt->lt_offset; in nfsd4_lockt()
7128 file_lock->fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); in nfsd4_lockt()
7130 nfs4_transform_lock_offset(file_lock); in nfsd4_lockt()
7132 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
7136 if (file_lock->fl_type != F_UNLCK) { in nfsd4_lockt()
7138 nfs4_set_lock_denied(file_lock, &lockt->lt_denied); in nfsd4_lockt()
7143 if (file_lock) in nfsd4_lockt()
7144 locks_free_lock(file_lock); in nfsd4_lockt()
7155 struct file_lock *file_lock = NULL; in nfsd4_locku() local
7177 file_lock = locks_alloc_lock(); in nfsd4_locku()
7178 if (!file_lock) { in nfsd4_locku()
7184 file_lock->fl_type = F_UNLCK; in nfsd4_locku()
7185 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(stp->st_stateowner)); in nfsd4_locku()
7186 file_lock->fl_pid = current->tgid; in nfsd4_locku()
7187 file_lock->fl_file = nf->nf_file; in nfsd4_locku()
7188 file_lock->fl_flags = FL_POSIX; in nfsd4_locku()
7189 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_locku()
7190 file_lock->fl_start = locku->lu_offset; in nfsd4_locku()
7192 file_lock->fl_end = last_byte_offset(locku->lu_offset, in nfsd4_locku()
7194 nfs4_transform_lock_offset(file_lock); in nfsd4_locku()
7196 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, NULL); in nfsd4_locku()
7209 if (file_lock) in nfsd4_locku()
7210 locks_free_lock(file_lock); in nfsd4_locku()
7226 struct file_lock *fl; in check_for_locks()