Lines Matching refs:delegation
1149 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode) in can_open_delegated() argument
1151 if (delegation == NULL) in can_open_delegated()
1153 if ((delegation->type & fmode) != fmode) in can_open_delegated()
1155 if (test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags)) in can_open_delegated()
1157 if (test_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) in can_open_delegated()
1159 nfs_mark_delegation_referenced(delegation); in can_open_delegated()
1300 …teid(struct nfs4_state *state, nfs4_stateid *open_stateid, nfs4_stateid *delegation, fmode_t fmode) in update_open_stateid() argument
1309 deleg_cur = rcu_dereference(nfsi->delegation); in update_open_stateid()
1314 if (rcu_dereference(nfsi->delegation) != deleg_cur || in update_open_stateid()
1319 if (delegation == NULL) in update_open_stateid()
1320 delegation = &deleg_cur->stateid; in update_open_stateid()
1321 else if (!nfs4_stateid_match(&deleg_cur->stateid, delegation)) in update_open_stateid()
1362 struct nfs_delegation *delegation; in nfs4_return_incompatible_delegation() local
1365 delegation = rcu_dereference(NFS_I(inode)->delegation); in nfs4_return_incompatible_delegation()
1366 if (delegation == NULL || (delegation->type & fmode) == fmode) { in nfs4_return_incompatible_delegation()
1378 struct nfs_delegation *delegation; in nfs4_try_open_cached() local
1393 delegation = rcu_dereference(nfsi->delegation); in nfs4_try_open_cached()
1394 if (!can_open_delegated(delegation, fmode)) { in nfs4_try_open_cached()
1399 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs4_try_open_cached()
1424 struct nfs_delegation *delegation; in nfs4_opendata_check_deleg() local
1428 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs4_opendata_check_deleg()
1429 if (delegation) in nfs4_opendata_check_deleg()
1430 delegation_flags = delegation->flags; in nfs4_opendata_check_deleg()
1638 struct nfs_delegation *delegation; in _nfs4_do_open_reclaim() local
1648 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in _nfs4_do_open_reclaim()
1649 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0) in _nfs4_do_open_reclaim()
1650 delegation_type = delegation->type; in _nfs4_do_open_reclaim()
1750 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid); in nfs4_open_delegation_recall()
1857 struct nfs_delegation *delegation; in nfs4_open_prepare() local
1862 delegation = rcu_dereference(NFS_I(data->state->inode)->delegation); in nfs4_open_prepare()
1865 can_open_delegated(delegation, data->o_arg.fmode)) in nfs4_open_prepare()
2192 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL) in nfs40_clear_delegation_stateid()
2208 struct nfs_delegation *delegation; in nfs41_check_delegation_stateid() local
2214 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs41_check_delegation_stateid()
2215 if (delegation == NULL) { in nfs41_check_delegation_stateid()
2220 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs41_check_delegation_stateid()
2221 cred = get_rpccred(delegation->cred); in nfs41_check_delegation_stateid()