Lines Matching refs:file_lock

3984 nfsd_break_deleg_cb(struct file_lock *fl)  in nfsd_break_deleg_cb()
4005 nfsd_change_deleg_cb(struct file_lock *onlist, int arg, in nfsd_change_deleg_cb()
4323 static struct file_lock *nfs4_alloc_init_lease(struct nfs4_delegation *dp, in nfs4_alloc_init_lease()
4326 struct file_lock *fl; in nfs4_alloc_init_lease()
4348 struct file_lock *fl; in nfs4_set_delegation()
5617 nfs4_transform_lock_offset(struct file_lock *lock) in nfs4_transform_lock_offset()
5644 nfsd4_lm_notify(struct file_lock *fl) in nfsd4_lm_notify()
5673 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) in nfs4_set_lock_denied()
5957 struct file_lock *file_lock = NULL; in nfsd4_lock() local
5958 struct file_lock *conflock = NULL; in nfsd4_lock()
6072 file_lock = &nbl->nbl_lock; in nfsd4_lock()
6073 file_lock->fl_type = fl_type; in nfsd4_lock()
6074 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lock_sop->lo_owner)); in nfsd4_lock()
6075 file_lock->fl_pid = current->tgid; in nfsd4_lock()
6076 file_lock->fl_file = filp; in nfsd4_lock()
6077 file_lock->fl_flags = fl_flags; in nfsd4_lock()
6078 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_lock()
6079 file_lock->fl_start = lock->lk_offset; in nfsd4_lock()
6080 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length); in nfsd4_lock()
6081 nfs4_transform_lock_offset(file_lock); in nfsd4_lock()
6098 err = vfs_lock_file(filp, F_SETLK, file_lock, conflock); in nfsd4_lock()
6167 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) in nfsd_test_lock()
6186 struct file_lock *file_lock = NULL; in nfsd4_lockt() local
6206 file_lock = locks_alloc_lock(); in nfsd4_lockt()
6207 if (!file_lock) { in nfsd4_lockt()
6216 file_lock->fl_type = F_RDLCK; in nfsd4_lockt()
6220 file_lock->fl_type = F_WRLCK; in nfsd4_lockt()
6230 file_lock->fl_owner = (fl_owner_t)lo; in nfsd4_lockt()
6231 file_lock->fl_pid = current->tgid; in nfsd4_lockt()
6232 file_lock->fl_flags = FL_POSIX; in nfsd4_lockt()
6234 file_lock->fl_start = lockt->lt_offset; in nfsd4_lockt()
6235 file_lock->fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); in nfsd4_lockt()
6237 nfs4_transform_lock_offset(file_lock); in nfsd4_lockt()
6239 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
6243 if (file_lock->fl_type != F_UNLCK) { in nfsd4_lockt()
6245 nfs4_set_lock_denied(file_lock, &lockt->lt_denied); in nfsd4_lockt()
6250 if (file_lock) in nfsd4_lockt()
6251 locks_free_lock(file_lock); in nfsd4_lockt()
6262 struct file_lock *file_lock = NULL; in nfsd4_locku() local
6284 file_lock = locks_alloc_lock(); in nfsd4_locku()
6285 if (!file_lock) { in nfsd4_locku()
6291 file_lock->fl_type = F_UNLCK; in nfsd4_locku()
6292 file_lock->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(stp->st_stateowner)); in nfsd4_locku()
6293 file_lock->fl_pid = current->tgid; in nfsd4_locku()
6294 file_lock->fl_file = filp; in nfsd4_locku()
6295 file_lock->fl_flags = FL_POSIX; in nfsd4_locku()
6296 file_lock->fl_lmops = &nfsd_posix_mng_ops; in nfsd4_locku()
6297 file_lock->fl_start = locku->lu_offset; in nfsd4_locku()
6299 file_lock->fl_end = last_byte_offset(locku->lu_offset, in nfsd4_locku()
6301 nfs4_transform_lock_offset(file_lock); in nfsd4_locku()
6303 err = vfs_lock_file(filp, F_SETLK, file_lock, NULL); in nfsd4_locku()
6316 if (file_lock) in nfsd4_locku()
6317 locks_free_lock(file_lock); in nfsd4_locku()
6333 struct file_lock *fl; in check_for_locks()