Lines Matching refs:lsp
1720 static bool nfs4_update_lock_stateid(struct nfs4_lock_state *lsp, in nfs4_update_lock_stateid() argument
1723 struct nfs4_state *state = lsp->ls_state; in nfs4_update_lock_stateid()
1727 if (!nfs4_stateid_match_other(stateid, &lsp->ls_stateid)) in nfs4_update_lock_stateid()
1729 if (!nfs4_stateid_is_newer(stateid, &lsp->ls_stateid)) in nfs4_update_lock_stateid()
1731 nfs4_stateid_copy(&lsp->ls_stateid, stateid); in nfs4_update_lock_stateid()
2149 struct nfs4_lock_state *lsp = fl->fl_u.nfs4_fl.owner; in nfs4_handle_delegation_recall_error() local
2150 if (lsp) in nfs4_handle_delegation_recall_error()
2151 set_bit(NFS_LOCK_LOST, &lsp->ls_flags); in nfs4_handle_delegation_recall_error()
2738 struct nfs4_lock_state *lsp, *prev = NULL; in nfs41_check_expired_locks() local
2745 list_for_each_entry(lsp, &state->lock_states, ls_locks) { in nfs41_check_expired_locks()
2746 if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags)) { in nfs41_check_expired_locks()
2747 struct rpc_cred *cred = lsp->ls_state->owner->so_cred; in nfs41_check_expired_locks()
2749 refcount_inc(&lsp->ls_count); in nfs41_check_expired_locks()
2753 prev = lsp; in nfs41_check_expired_locks()
2756 &lsp->ls_stateid, in nfs41_check_expired_locks()
2758 trace_nfs4_test_lock_stateid(state, lsp, status); in nfs41_check_expired_locks()
2761 clear_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags); in nfs41_check_expired_locks()
2762 lsp->ls_stateid.type = NFS4_INVALID_STATEID_TYPE; in nfs41_check_expired_locks()
2764 set_bit(NFS_LOCK_LOST, &lsp->ls_flags); in nfs41_check_expired_locks()
6278 struct nfs4_lock_state *lsp; in _nfs4_proc_getlk() local
6285 lsp = request->fl_u.nfs4_fl.owner; in _nfs4_proc_getlk()
6286 arg.lock_owner.id = lsp->ls_seqid.owner_id; in _nfs4_proc_getlk()
6319 struct nfs4_lock_state *lsp; member
6329 struct nfs4_lock_state *lsp, in nfs4_alloc_unlockdata() argument
6333 struct inode *inode = lsp->ls_state->inode; in nfs4_alloc_unlockdata()
6342 p->lsp = lsp; in nfs4_alloc_unlockdata()
6343 refcount_inc(&lsp->ls_count); in nfs4_alloc_unlockdata()
6356 nfs4_put_lock_state(calldata->lsp); in nfs4_locku_release_calldata()
6366 .inode = calldata->lsp->ls_state->inode, in nfs4_locku_done()
6375 locks_lock_inode_wait(calldata->lsp->ls_state->inode, &calldata->fl); in nfs4_locku_done()
6376 if (nfs4_update_lock_stateid(calldata->lsp, in nfs4_locku_done()
6390 &calldata->lsp->ls_stateid)) in nfs4_locku_done()
6413 nfs4_stateid_copy(&calldata->arg.stateid, &calldata->lsp->ls_stateid); in nfs4_locku_prepare()
6414 if (test_bit(NFS_LOCK_INITIALIZED, &calldata->lsp->ls_flags) == 0) { in nfs4_locku_prepare()
6439 struct nfs4_lock_state *lsp, in nfs4_do_unlck() argument
6448 .rpc_client = NFS_CLIENT(lsp->ls_state->inode), in nfs4_do_unlck()
6455 nfs4_state_protect(NFS_SERVER(lsp->ls_state->inode)->nfs_client, in nfs4_do_unlck()
6465 data = nfs4_alloc_unlockdata(fl, ctx, lsp, seqid); in nfs4_do_unlck()
6484 struct nfs4_lock_state *lsp; in nfs4_proc_unlck() local
6507 lsp = request->fl_u.nfs4_fl.owner; in nfs4_proc_unlck()
6508 if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) == 0) in nfs4_proc_unlck()
6511 seqid = alloc_seqid(&lsp->ls_seqid, GFP_KERNEL); in nfs4_proc_unlck()
6515 task = nfs4_do_unlck(request, nfs_file_open_context(request->fl_file), lsp, seqid); in nfs4_proc_unlck()
6530 struct nfs4_lock_state *lsp; member
6540 struct nfs_open_context *ctx, struct nfs4_lock_state *lsp, in nfs4_alloc_lockdata() argument
6544 struct inode *inode = lsp->ls_state->inode; in nfs4_alloc_lockdata()
6554 p->arg.open_seqid = nfs_alloc_seqid(&lsp->ls_state->owner->so_seqid, gfp_mask); in nfs4_alloc_lockdata()
6558 p->arg.lock_seqid = alloc_seqid(&lsp->ls_seqid, gfp_mask); in nfs4_alloc_lockdata()
6562 p->arg.lock_owner.id = lsp->ls_seqid.owner_id; in nfs4_alloc_lockdata()
6565 p->lsp = lsp; in nfs4_alloc_lockdata()
6567 refcount_inc(&lsp->ls_count); in nfs4_alloc_lockdata()
6581 struct nfs4_state *state = data->lsp->ls_state; in nfs4_lock_prepare()
6587 if (!test_bit(NFS_LOCK_INITIALIZED, &data->lsp->ls_flags)) { in nfs4_lock_prepare()
6598 &data->lsp->ls_stateid); in nfs4_lock_prepare()
6623 struct nfs4_lock_state *lsp = data->lsp; in nfs4_lock_done() local
6637 if (locks_lock_inode_wait(lsp->ls_state->inode, &data->fl) < 0) in nfs4_lock_done()
6641 nfs_confirm_seqid(&lsp->ls_seqid, 0); in nfs4_lock_done()
6642 nfs4_stateid_copy(&lsp->ls_stateid, &data->res.stateid); in nfs4_lock_done()
6643 set_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags); in nfs4_lock_done()
6644 } else if (!nfs4_update_lock_stateid(lsp, &data->res.stateid)) in nfs4_lock_done()
6653 &lsp->ls_state->open_stateid)) in nfs4_lock_done()
6655 else if (nfs4_async_handle_error(task, server, lsp->ls_state, NULL) == -EAGAIN) in nfs4_lock_done()
6658 &lsp->ls_stateid)) in nfs4_lock_done()
6678 task = nfs4_do_unlck(&data->fl, data->ctx, data->lsp, in nfs4_lock_release()
6685 nfs4_put_lock_state(data->lsp); in nfs4_lock_release()
6697 static void nfs4_handle_setlk_error(struct nfs_server *server, struct nfs4_lock_state *lsp, int new… in nfs4_handle_setlk_error() argument
6703 lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; in nfs4_handle_setlk_error()
6705 test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) != 0) in nfs4_handle_setlk_error()
6706 nfs4_schedule_stateid_recovery(server, lsp->ls_state); in nfs4_handle_setlk_error()
6709 lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; in nfs4_handle_setlk_error()
6756 nfs4_handle_setlk_error(data->server, data->lsp, in _nfs4_do_setlk()
6821 struct nfs4_lock_state *lsp; in nfs41_lock_expired() local
6827 lsp = request->fl_u.nfs4_fl.owner; in nfs41_lock_expired()
6828 if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) || in nfs41_lock_expired()
6829 test_bit(NFS_LOCK_LOST, &lsp->ls_flags)) in nfs41_lock_expired()
6946 struct nfs4_lock_state *lsp = request->fl_u.nfs4_fl.owner; in nfs4_retry_setlk() local
6951 .id = lsp->ls_seqid.owner_id, in nfs4_retry_setlk()
7063 struct nfs4_lock_state *lsp; member
7106 nfs4_free_lock_state(data->server, data->lsp); in nfs4_release_lockowner_release()
7117 nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp) in nfs4_release_lockowner() argument
7130 data->lsp = lsp; in nfs4_release_lockowner()
7133 data->args.lock_owner.id = lsp->ls_seqid.owner_id; in nfs4_release_lockowner()
9579 nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp) in nfs41_free_lock_state() argument
9581 struct rpc_cred *cred = lsp->ls_state->owner->so_cred; in nfs41_free_lock_state()
9583 nfs41_free_stateid(server, &lsp->ls_stateid, cred, false); in nfs41_free_lock_state()
9584 nfs4_free_lock_state(server, lsp); in nfs41_free_lock_state()