Lines Matching refs:lsp
1847 static bool nfs4_update_lock_stateid(struct nfs4_lock_state *lsp, in nfs4_update_lock_stateid() argument
1850 struct nfs4_state *state = lsp->ls_state; in nfs4_update_lock_stateid()
1854 if (!nfs4_stateid_match_other(stateid, &lsp->ls_stateid)) in nfs4_update_lock_stateid()
1856 if (!nfs4_stateid_is_newer(stateid, &lsp->ls_stateid)) in nfs4_update_lock_stateid()
1858 nfs4_stateid_copy(&lsp->ls_stateid, stateid); in nfs4_update_lock_stateid()
2290 struct nfs4_lock_state *lsp = fl->fl_u.nfs4_fl.owner; in nfs4_handle_delegation_recall_error() local
2291 if (lsp) in nfs4_handle_delegation_recall_error()
2292 set_bit(NFS_LOCK_LOST, &lsp->ls_flags); in nfs4_handle_delegation_recall_error()
2897 struct nfs4_lock_state *lsp, *prev = NULL; in nfs41_check_expired_locks() local
2904 list_for_each_entry(lsp, &state->lock_states, ls_locks) { in nfs41_check_expired_locks()
2905 if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags)) { in nfs41_check_expired_locks()
2906 const struct cred *cred = lsp->ls_state->owner->so_cred; in nfs41_check_expired_locks()
2908 refcount_inc(&lsp->ls_count); in nfs41_check_expired_locks()
2912 prev = lsp; in nfs41_check_expired_locks()
2915 &lsp->ls_stateid, in nfs41_check_expired_locks()
2917 trace_nfs4_test_lock_stateid(state, lsp, status); in nfs41_check_expired_locks()
2920 clear_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags); in nfs41_check_expired_locks()
2921 lsp->ls_stateid.type = NFS4_INVALID_STATEID_TYPE; in nfs41_check_expired_locks()
2923 set_bit(NFS_LOCK_LOST, &lsp->ls_flags); in nfs41_check_expired_locks()
6638 struct nfs4_lock_state *lsp; in _nfs4_proc_getlk() local
6645 lsp = request->fl_u.nfs4_fl.owner; in _nfs4_proc_getlk()
6646 arg.lock_owner.id = lsp->ls_seqid.owner_id; in _nfs4_proc_getlk()
6683 struct nfs4_lock_state *lsp) in nfs4_refresh_lock_old_stateid() argument
6685 struct nfs4_state *state = lsp->ls_state; in nfs4_refresh_lock_old_stateid()
6689 if (!nfs4_stateid_match_other(dst, &lsp->ls_stateid)) in nfs4_refresh_lock_old_stateid()
6691 if (!nfs4_stateid_is_newer(&lsp->ls_stateid, dst)) in nfs4_refresh_lock_old_stateid()
6694 dst->seqid = lsp->ls_stateid.seqid; in nfs4_refresh_lock_old_stateid()
6702 struct nfs4_lock_state *lsp) in nfs4_sync_lock_stateid() argument
6704 struct nfs4_state *state = lsp->ls_state; in nfs4_sync_lock_stateid()
6708 ret = !nfs4_stateid_match_other(dst, &lsp->ls_stateid); in nfs4_sync_lock_stateid()
6709 nfs4_stateid_copy(dst, &lsp->ls_stateid); in nfs4_sync_lock_stateid()
6717 struct nfs4_lock_state *lsp; member
6727 struct nfs4_lock_state *lsp, in nfs4_alloc_unlockdata() argument
6731 struct nfs4_state *state = lsp->ls_state; in nfs4_alloc_unlockdata()
6741 p->lsp = lsp; in nfs4_alloc_unlockdata()
6749 nfs4_stateid_copy(&p->arg.stateid, &lsp->ls_stateid); in nfs4_alloc_unlockdata()
6758 nfs4_put_lock_state(calldata->lsp); in nfs4_locku_release_calldata()
6768 .inode = calldata->lsp->ls_state->inode, in nfs4_locku_done()
6777 locks_lock_inode_wait(calldata->lsp->ls_state->inode, &calldata->fl); in nfs4_locku_done()
6778 if (nfs4_update_lock_stateid(calldata->lsp, in nfs4_locku_done()
6791 calldata->lsp)) in nfs4_locku_done()
6796 calldata->lsp)) in nfs4_locku_done()
6819 if (test_bit(NFS_LOCK_INITIALIZED, &calldata->lsp->ls_flags) == 0) { in nfs4_locku_prepare()
6844 struct nfs4_lock_state *lsp, in nfs4_do_unlck() argument
6853 .rpc_client = NFS_CLIENT(lsp->ls_state->inode), in nfs4_do_unlck()
6860 nfs4_state_protect(NFS_SERVER(lsp->ls_state->inode)->nfs_client, in nfs4_do_unlck()
6870 data = nfs4_alloc_unlockdata(fl, ctx, lsp, seqid); in nfs4_do_unlck()
6889 struct nfs4_lock_state *lsp; in nfs4_proc_unlck() local
6912 lsp = request->fl_u.nfs4_fl.owner; in nfs4_proc_unlck()
6913 if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) == 0) in nfs4_proc_unlck()
6916 seqid = alloc_seqid(&lsp->ls_seqid, GFP_KERNEL); in nfs4_proc_unlck()
6920 task = nfs4_do_unlck(request, nfs_file_open_context(request->fl_file), lsp, seqid); in nfs4_proc_unlck()
6935 struct nfs4_lock_state *lsp; member
6945 struct nfs_open_context *ctx, struct nfs4_lock_state *lsp, in nfs4_alloc_lockdata() argument
6949 struct inode *inode = lsp->ls_state->inode; in nfs4_alloc_lockdata()
6959 p->arg.open_seqid = nfs_alloc_seqid(&lsp->ls_state->owner->so_seqid, gfp_mask); in nfs4_alloc_lockdata()
6963 p->arg.lock_seqid = alloc_seqid(&lsp->ls_seqid, gfp_mask); in nfs4_alloc_lockdata()
6967 p->arg.lock_owner.id = lsp->ls_seqid.owner_id; in nfs4_alloc_lockdata()
6970 p->lsp = lsp; in nfs4_alloc_lockdata()
6986 struct nfs4_state *state = data->lsp->ls_state; in nfs4_lock_prepare()
6992 if (!test_bit(NFS_LOCK_INITIALIZED, &data->lsp->ls_flags)) { in nfs4_lock_prepare()
7003 &data->lsp->ls_stateid); in nfs4_lock_prepare()
7028 struct nfs4_lock_state *lsp = data->lsp; in nfs4_lock_done() local
7042 if (locks_lock_inode_wait(lsp->ls_state->inode, &data->fl) < 0) in nfs4_lock_done()
7046 nfs_confirm_seqid(&lsp->ls_seqid, 0); in nfs4_lock_done()
7047 nfs4_stateid_copy(&lsp->ls_stateid, &data->res.stateid); in nfs4_lock_done()
7048 set_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags); in nfs4_lock_done()
7049 } else if (!nfs4_update_lock_stateid(lsp, &data->res.stateid)) in nfs4_lock_done()
7055 lsp->ls_state)) in nfs4_lock_done()
7057 if (nfs4_refresh_lock_old_stateid(&data->arg.lock_stateid, lsp)) in nfs4_lock_done()
7065 &lsp->ls_state->open_stateid)) in nfs4_lock_done()
7067 else if (nfs4_async_handle_error(task, server, lsp->ls_state, NULL) == -EAGAIN) in nfs4_lock_done()
7070 &lsp->ls_stateid)) in nfs4_lock_done()
7090 task = nfs4_do_unlck(&data->fl, data->ctx, data->lsp, in nfs4_lock_release()
7097 nfs4_put_lock_state(data->lsp); in nfs4_lock_release()
7109 static void nfs4_handle_setlk_error(struct nfs_server *server, struct nfs4_lock_state *lsp, int new… in nfs4_handle_setlk_error() argument
7115 lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; in nfs4_handle_setlk_error()
7117 test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) != 0) in nfs4_handle_setlk_error()
7118 nfs4_schedule_stateid_recovery(server, lsp->ls_state); in nfs4_handle_setlk_error()
7121 lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; in nfs4_handle_setlk_error()
7168 nfs4_handle_setlk_error(data->server, data->lsp, in _nfs4_do_setlk()
7233 struct nfs4_lock_state *lsp; in nfs41_lock_expired() local
7239 lsp = request->fl_u.nfs4_fl.owner; in nfs41_lock_expired()
7240 if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags) || in nfs41_lock_expired()
7241 test_bit(NFS_LOCK_LOST, &lsp->ls_flags)) in nfs41_lock_expired()
7359 struct nfs4_lock_state *lsp = request->fl_u.nfs4_fl.owner; in nfs4_retry_setlk() local
7364 .id = lsp->ls_seqid.owner_id, in nfs4_retry_setlk()
7476 struct nfs4_lock_state *lsp; member
7519 nfs4_free_lock_state(data->server, data->lsp); in nfs4_release_lockowner_release()
7530 nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp) in nfs4_release_lockowner() argument
7543 data->lsp = lsp; in nfs4_release_lockowner()
7546 data->args.lock_owner.id = lsp->ls_seqid.owner_id; in nfs4_release_lockowner()
10181 nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp) in nfs41_free_lock_state() argument
10183 const struct cred *cred = lsp->ls_state->owner->so_cred; in nfs41_free_lock_state()
10185 nfs41_free_stateid(server, &lsp->ls_stateid, cred, false); in nfs41_free_lock_state()
10186 nfs4_free_lock_state(server, lsp); in nfs41_free_lock_state()