Lines Matching refs:file_lock

4872 nfsd_break_deleg_cb(struct file_lock *fl)  in nfsd_break_deleg_cb()
4910 static bool nfsd_breaker_owns_lease(struct file_lock *fl) in nfsd_breaker_owns_lease()
4927 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
5288 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
5291 struct file_lock *fl; in nfs4_alloc_init_lease()
5403 struct file_lock *fl; in nfs4_set_delegation()
6933 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
6961 nfsd4_lm_lock_expirable(struct file_lock *cfl) in nfsd4_lm_lock_expirable()
6983 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
7017 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
7300 struct file_lock *file_lock = NULL; in nfsd4_lock() local
7301 struct file_lock *conflock = NULL; in nfsd4_lock()
7424 file_lock = &nbl->nbl_lock; in nfsd4_lock()
7425 file_lock->fl_type = fl_type; in nfsd4_lock()
7426 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); in nfsd4_lock()
7427 file_lock->fl_pid = current->tgid; in nfsd4_lock()
7428 file_lock->fl_file = nf->nf_file; in nfsd4_lock()
7429 file_lock->fl_flags = fl_flags; in nfsd4_lock()
7430 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_lock()
7431 file_lock->fl_start = lock->lk_offset; in nfsd4_lock()
7432 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length); in nfsd4_lock()
7433 nfs4_transform_lock_offset(file_lock); in nfsd4_lock()
7451 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, conflock); in nfsd4_lock()
7525 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) in nfsd_test_lock()
7556 struct file_lock *file_lock = NULL; in nfsd4_lockt() local
7576 file_lock = locks_alloc_lock(); in nfsd4_lockt()
7577 if (!file_lock) { in nfsd4_lockt()
7586 file_lock->fl_type = F_RDLCK; in nfsd4_lockt()
7590 file_lock->fl_type = F_WRLCK; in nfsd4_lockt()
7600 file_lock->fl_owner = (fl_owner_t)lo; in nfsd4_lockt()
7601 file_lock->fl_pid = current->tgid; in nfsd4_lockt()
7602 file_lock->fl_flags = FL_POSIX; in nfsd4_lockt()
7604 file_lock->fl_start = lockt->lt_offset; in nfsd4_lockt()
7605 file_lock->fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); in nfsd4_lockt()
7607 nfs4_transform_lock_offset(file_lock); in nfsd4_lockt()
7609 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
7613 if (file_lock->fl_type != F_UNLCK) { in nfsd4_lockt()
7615 nfs4_set_lock_denied(file_lock, &lockt->lt_denied); in nfsd4_lockt()
7620 if (file_lock) in nfsd4_lockt()
7621 locks_free_lock(file_lock); in nfsd4_lockt()
7632 struct file_lock *file_lock = NULL; in nfsd4_locku() local
7654 file_lock = locks_alloc_lock(); in nfsd4_locku()
7655 if (!file_lock) { in nfsd4_locku()
7661 file_lock->fl_type = F_UNLCK; in nfsd4_locku()
7662 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(stp->st_stateowner)); in nfsd4_locku()
7663 file_lock->fl_pid = current->tgid; in nfsd4_locku()
7664 file_lock->fl_file = nf->nf_file; in nfsd4_locku()
7665 file_lock->fl_flags = FL_POSIX; in nfsd4_locku()
7666 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_locku()
7667 file_lock->fl_start = locku->lu_offset; in nfsd4_locku()
7669 file_lock->fl_end = last_byte_offset(locku->lu_offset, in nfsd4_locku()
7671 nfs4_transform_lock_offset(file_lock); in nfsd4_locku()
7673 err = vfs_lock_file(nf->nf_file, F_SETLK, file_lock, NULL); in nfsd4_locku()
7686 if (file_lock) in nfsd4_locku()
7687 locks_free_lock(file_lock); in nfsd4_locku()
7703 struct file_lock *fl; in check_for_locks()