Lines Matching refs:delegation
1436 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode, in can_open_delegated() argument
1439 if (delegation == NULL) in can_open_delegated()
1441 if ((delegation->type & fmode) != fmode) in can_open_delegated()
1448 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags)) in can_open_delegated()
1454 nfs_mark_delegation_referenced(delegation); in can_open_delegated()
1721 const nfs4_stateid *delegation, in update_open_stateid() argument
1740 deleg_cur = rcu_dereference(nfsi->delegation); in update_open_stateid()
1745 if (rcu_dereference(nfsi->delegation) != deleg_cur || in update_open_stateid()
1750 if (delegation == NULL) in update_open_stateid()
1751 delegation = &deleg_cur->stateid; in update_open_stateid()
1752 else if (!nfs4_stateid_match(&deleg_cur->stateid, delegation)) in update_open_stateid()
1795 struct nfs_delegation *delegation; in nfs4_return_incompatible_delegation() local
1799 delegation = rcu_dereference(NFS_I(inode)->delegation); in nfs4_return_incompatible_delegation()
1800 if (delegation == NULL || (delegation->type & fmode) == fmode) { in nfs4_return_incompatible_delegation()
1811 struct nfs_delegation *delegation; in nfs4_try_open_cached() local
1827 delegation = nfs4_get_valid_delegation(state->inode); in nfs4_try_open_cached()
1828 if (!can_open_delegated(delegation, fmode, claim)) { in nfs4_try_open_cached()
1833 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs4_try_open_cached()
1858 struct nfs_delegation *delegation; in nfs4_opendata_check_deleg() local
1862 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs4_opendata_check_deleg()
1863 if (delegation) in nfs4_opendata_check_deleg()
1864 delegation_flags = delegation->flags; in nfs4_opendata_check_deleg()
1881 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1887 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1892 &data->o_res.delegation); in nfs4_opendata_check_deleg()
2122 struct nfs_delegation *delegation; in _nfs4_do_open_reclaim() local
2132 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in _nfs4_do_open_reclaim()
2133 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0) in _nfs4_do_open_reclaim()
2134 delegation_type = delegation->type; in _nfs4_do_open_reclaim()
2240 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid); in nfs4_open_delegation_recall()
2365 struct nfs_delegation *delegation; in nfs4_open_prepare() local
2371 delegation = nfs4_get_valid_delegation(data->state->inode); in nfs4_open_prepare()
2372 if (can_open_delegated(delegation, data->o_arg.fmode, claim)) in nfs4_open_prepare()
2704 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL) in nfs40_clear_delegation_stateid()
2759 struct nfs_delegation *delegation; in nfs41_check_delegation_stateid() local
2765 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs41_check_delegation_stateid()
2766 if (delegation == NULL) { in nfs41_check_delegation_stateid()
2772 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs41_check_delegation_stateid()
2775 &delegation->flags)) { in nfs41_check_delegation_stateid()
2780 if (delegation->cred) in nfs41_check_delegation_stateid()
2781 cred = get_cred(delegation->cred); in nfs41_check_delegation_stateid()