Lines Matching refs:delegation

60 #include "delegation.h"
1315 /* Want no delegation if we're using O_DIRECT */
1526 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode,
1529 if (delegation == NULL)
1531 if ((delegation->type & fmode) != fmode)
1538 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags))
1544 nfs_mark_delegation_referenced(delegation);
1798 const nfs4_stateid *delegation,
1822 if (rcu_dereference(nfsi->delegation) != deleg_cur ||
1827 if (delegation == NULL)
1828 delegation = &deleg_cur->stateid;
1829 else if (!nfs4_stateid_match_other(&deleg_cur->stateid, delegation))
1872 struct nfs_delegation *delegation;
1876 delegation = nfs4_get_valid_delegation(inode);
1877 if (delegation == NULL || (delegation->type & fmode) == fmode) {
1888 struct nfs_delegation *delegation;
1904 delegation = nfs4_get_valid_delegation(state->inode);
1905 if (!can_open_delegated(delegation, fmode, claim)) {
1909 /* Save the delegation */
1910 nfs4_stateid_copy(&stateid, &delegation->stateid);
1920 /* Try to update the stateid using the delegation */
1935 struct nfs_delegation *delegation;
1939 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
1940 if (delegation)
1941 delegation_flags = delegation->flags;
1949 "returning a delegation for "
1958 &data->o_res.delegation,
1964 &data->o_res.delegation,
1969 &data->o_res.delegation);
2198 struct nfs_delegation *delegation;
2208 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
2209 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0)
2210 delegation_type = delegation->type;
2271 /* Don't recall a delegation if it was lost */
2316 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid);
2438 * a delegation instead.
2441 struct nfs_delegation *delegation;
2447 delegation = nfs4_get_valid_delegation(data->state->inode);
2448 if (can_open_delegated(delegation, data->o_arg.fmode, claim))
2732 * We're not recovering a delegation, so ask for no delegation.
2734 * delegation return.
2790 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL)
2796 /* NFSv4.0 doesn't allow for delegation recovery on open expire */
2845 struct nfs_delegation *delegation;
2849 /* Get the delegation credential for use by test/free_stateid */
2851 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
2852 if (delegation == NULL) {
2858 spin_lock(&delegation->lock);
2859 nfs4_stateid_copy(&stateid, &delegation->stateid);
2862 &delegation->flags)) {
2863 spin_unlock(&delegation->lock);
2868 if (delegation->cred)
2869 cred = get_cred(delegation->cred);
2870 spin_unlock(&delegation->lock);
3283 /* We must have found a delegation */
5566 * a delegation
7386 /* ...but avoid races with delegation recall... */
7585 /* No delegation, no lease */
7591 /* We raced with a delegation return */