Lines Matching refs:delegation

60 #include "delegation.h"
1299 /* Want no delegation if we're using O_DIRECT */
1521 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode,
1524 if (delegation == NULL)
1526 if ((delegation->type & fmode) != fmode)
1533 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags))
1539 nfs_mark_delegation_referenced(delegation);
1793 const nfs4_stateid *delegation,
1817 if (rcu_dereference(nfsi->delegation) != deleg_cur ||
1822 if (delegation == NULL)
1823 delegation = &deleg_cur->stateid;
1824 else if (!nfs4_stateid_match_other(&deleg_cur->stateid, delegation))
1867 struct nfs_delegation *delegation;
1871 delegation = nfs4_get_valid_delegation(inode);
1872 if (delegation == NULL || (delegation->type & fmode) == fmode) {
1883 struct nfs_delegation *delegation;
1899 delegation = nfs4_get_valid_delegation(state->inode);
1900 if (!can_open_delegated(delegation, fmode, claim)) {
1904 /* Save the delegation */
1905 nfs4_stateid_copy(&stateid, &delegation->stateid);
1915 /* Try to update the stateid using the delegation */
1930 struct nfs_delegation *delegation;
1934 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
1935 if (delegation)
1936 delegation_flags = delegation->flags;
1944 "returning a delegation for "
1953 &data->o_res.delegation,
1959 &data->o_res.delegation,
1964 &data->o_res.delegation);
2193 struct nfs_delegation *delegation;
2203 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
2204 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0)
2205 delegation_type = delegation->type;
2265 /* Don't recall a delegation if it was lost */
2310 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid);
2432 * a delegation instead.
2435 struct nfs_delegation *delegation;
2441 delegation = nfs4_get_valid_delegation(data->state->inode);
2442 if (can_open_delegated(delegation, data->o_arg.fmode, claim))
2722 * We're not recovering a delegation, so ask for no delegation.
2724 * delegation return.
2780 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL)
2786 /* NFSv4.0 doesn't allow for delegation recovery on open expire */
2835 struct nfs_delegation *delegation;
2839 /* Get the delegation credential for use by test/free_stateid */
2841 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
2842 if (delegation == NULL) {
2848 spin_lock(&delegation->lock);
2849 nfs4_stateid_copy(&stateid, &delegation->stateid);
2852 &delegation->flags)) {
2853 spin_unlock(&delegation->lock);
2858 if (delegation->cred)
2859 cred = get_cred(delegation->cred);
2860 spin_unlock(&delegation->lock);
3285 /* We must have found a delegation */
5448 * a delegation
7262 /* ...but avoid races with delegation recall... */