Lines Matching refs:delegation
1375 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode, in can_open_delegated() argument
1378 if (delegation == NULL) in can_open_delegated()
1380 if ((delegation->type & fmode) != fmode) in can_open_delegated()
1382 if (test_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) in can_open_delegated()
1389 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags)) in can_open_delegated()
1395 nfs_mark_delegation_referenced(delegation); in can_open_delegated()
1650 const nfs4_stateid *delegation, in update_open_stateid() argument
1669 deleg_cur = rcu_dereference(nfsi->delegation); in update_open_stateid()
1674 if (rcu_dereference(nfsi->delegation) != deleg_cur || in update_open_stateid()
1679 if (delegation == NULL) in update_open_stateid()
1680 delegation = &deleg_cur->stateid; in update_open_stateid()
1681 else if (!nfs4_stateid_match(&deleg_cur->stateid, delegation)) in update_open_stateid()
1724 struct nfs_delegation *delegation; in nfs4_return_incompatible_delegation() local
1728 delegation = rcu_dereference(NFS_I(inode)->delegation); in nfs4_return_incompatible_delegation()
1729 if (delegation == NULL || (delegation->type & fmode) == fmode) { in nfs4_return_incompatible_delegation()
1741 struct nfs_delegation *delegation; in nfs4_try_open_cached() local
1757 delegation = rcu_dereference(nfsi->delegation); in nfs4_try_open_cached()
1758 if (!can_open_delegated(delegation, fmode, claim)) { in nfs4_try_open_cached()
1763 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs4_try_open_cached()
1788 struct nfs_delegation *delegation; in nfs4_opendata_check_deleg() local
1792 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs4_opendata_check_deleg()
1793 if (delegation) in nfs4_opendata_check_deleg()
1794 delegation_flags = delegation->flags; in nfs4_opendata_check_deleg()
1811 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1817 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1822 &data->o_res.delegation); in nfs4_opendata_check_deleg()
2036 struct nfs_delegation *delegation; in _nfs4_do_open_reclaim() local
2046 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in _nfs4_do_open_reclaim()
2047 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0) in _nfs4_do_open_reclaim()
2048 delegation_type = delegation->type; in _nfs4_do_open_reclaim()
2155 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid); in nfs4_open_delegation_recall()
2277 struct nfs_delegation *delegation; in nfs4_open_prepare() local
2282 delegation = rcu_dereference(NFS_I(data->state->inode)->delegation); in nfs4_open_prepare()
2283 if (can_open_delegated(delegation, data->o_arg.fmode, claim)) in nfs4_open_prepare()
2614 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL) in nfs40_clear_delegation_stateid()
2668 struct nfs_delegation *delegation; in nfs41_check_delegation_stateid() local
2674 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs41_check_delegation_stateid()
2675 if (delegation == NULL) { in nfs41_check_delegation_stateid()
2681 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs41_check_delegation_stateid()
2682 if (test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) { in nfs41_check_delegation_stateid()
2689 &delegation->flags)) { in nfs41_check_delegation_stateid()
2694 cred = get_rpccred(delegation->cred); in nfs41_check_delegation_stateid()