Lines Matching refs:cred
111 int nfs4_init_clientid(struct nfs_client *clp, const struct cred *cred) in nfs4_init_clientid() argument
127 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs4_init_clientid()
134 status = nfs4_proc_setclientid_confirm(clp, &clid, cred); in nfs4_init_clientid()
158 const struct cred *cred) in nfs40_discover_server_trunking() argument
172 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs40_discover_server_trunking()
178 status = nfs40_walk_client_list(clp, result, cred); in nfs40_discover_server_trunking()
192 const struct cred *nfs4_get_machine_cred(struct nfs_client *clp) in nfs4_get_machine_cred()
205 static const struct cred *
208 const struct cred *cred = NULL; in nfs4_get_renew_cred_server_locked() local
218 cred = get_cred(sp->so_cred); in nfs4_get_renew_cred_server_locked()
221 return cred; in nfs4_get_renew_cred_server_locked()
231 const struct cred *nfs4_get_renew_cred(struct nfs_client *clp) in nfs4_get_renew_cred()
233 const struct cred *cred = NULL; in nfs4_get_renew_cred() local
237 cred = nfs4_get_machine_cred(clp); in nfs4_get_renew_cred()
238 if (cred != NULL) in nfs4_get_renew_cred()
244 cred = nfs4_get_renew_cred_server_locked(server); in nfs4_get_renew_cred()
245 if (cred != NULL) in nfs4_get_renew_cred()
252 return cred; in nfs4_get_renew_cred()
319 int nfs41_init_clientid(struct nfs_client *clp, const struct cred *cred) in nfs41_init_clientid() argument
325 status = nfs4_proc_exchange_id(clp, cred); in nfs41_init_clientid()
330 status = nfs4_proc_create_session(clp, cred); in nfs41_init_clientid()
354 const struct cred *cred) in nfs41_discover_server_trunking() argument
358 status = nfs4_proc_exchange_id(clp, cred); in nfs41_discover_server_trunking()
362 status = nfs41_walk_client_list(clp, result, cred); in nfs41_discover_server_trunking()
394 const struct cred *nfs4_get_clid_cred(struct nfs_client *clp) in nfs4_get_clid_cred()
396 const struct cred *cred; in nfs4_get_clid_cred() local
398 cred = nfs4_get_machine_cred(clp); in nfs4_get_clid_cred()
399 return cred; in nfs4_get_clid_cred()
403 nfs4_find_state_owner_locked(struct nfs_server *server, const struct cred *cred) in nfs4_find_state_owner_locked() argument
413 cmp = cred_fscmp(cred, sp->so_cred); in nfs4_find_state_owner_locked()
492 const struct cred *cred, in nfs4_alloc_state_owner() argument
507 sp->so_cred = get_cred(cred); in nfs4_alloc_state_owner()
575 const struct cred *cred, in nfs4_get_state_owner() argument
582 sp = nfs4_find_state_owner_locked(server, cred); in nfs4_get_state_owner()
586 new = nfs4_alloc_state_owner(server, cred, gfp_flags); in nfs4_get_state_owner()
1044 nfs4_stateid *dst, const struct cred **cred) in nfs4_select_rw_stateid() argument
1050 if (cred != NULL) in nfs4_select_rw_stateid()
1051 *cred = NULL; in nfs4_select_rw_stateid()
1057 if (nfs4_copy_delegation_stateid(state->inode, fmode, dst, cred)) { in nfs4_select_rw_stateid()
1788 const struct cred *cred) in nfs4_reclaim_complete() argument
1792 return ops->reclaim_complete(clp, cred); in nfs4_reclaim_complete()
1839 const struct cred *cred; in nfs4_state_end_reclaim_reboot() local
1845 cred = nfs4_get_clid_cred(clp); in nfs4_state_end_reclaim_reboot()
1846 err = nfs4_reclaim_complete(clp, ops, cred); in nfs4_state_end_reclaim_reboot()
1847 put_cred(cred); in nfs4_state_end_reclaim_reboot()
1945 const struct cred *cred; in nfs4_check_lease() local
1953 cred = ops->get_state_renewal_cred(clp); in nfs4_check_lease()
1954 if (cred == NULL) { in nfs4_check_lease()
1955 cred = nfs4_get_clid_cred(clp); in nfs4_check_lease()
1957 if (cred == NULL) in nfs4_check_lease()
1960 status = ops->renew_lease(clp, cred); in nfs4_check_lease()
1961 put_cred(cred); in nfs4_check_lease()
2020 const struct cred *cred; in nfs4_establish_lease() local
2028 cred = nfs4_get_clid_cred(clp); in nfs4_establish_lease()
2029 if (cred == NULL) in nfs4_establish_lease()
2031 status = ops->establish_clid(clp, cred); in nfs4_establish_lease()
2032 put_cred(cred); in nfs4_establish_lease()
2079 static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred) in nfs4_try_migration() argument
2101 result = nfs4_proc_get_locations(inode, locations, page, cred); in nfs4_try_migration()
2154 const struct cred *cred; in nfs4_handle_migration() local
2159 cred = ops->get_state_renewal_cred(clp); in nfs4_handle_migration()
2160 if (cred == NULL) in nfs4_handle_migration()
2178 status = nfs4_try_migration(server, cred); in nfs4_handle_migration()
2180 put_cred(cred); in nfs4_handle_migration()
2186 put_cred(cred); in nfs4_handle_migration()
2200 const struct cred *cred; in nfs4_handle_lease_moved() local
2205 cred = ops->get_state_renewal_cred(clp); in nfs4_handle_lease_moved()
2206 if (cred == NULL) in nfs4_handle_lease_moved()
2223 status = nfs4_proc_fsid_present(inode, cred); in nfs4_handle_lease_moved()
2226 if (nfs4_try_migration(server, cred) == -NFS4ERR_LEASE_MOVED) in nfs4_handle_lease_moved()
2233 put_cred(cred); in nfs4_handle_lease_moved()
2256 const struct cred *cred; in nfs4_discover_server_trunking() local
2267 cred = nfs4_get_clid_cred(clp); in nfs4_discover_server_trunking()
2268 if (cred == NULL) in nfs4_discover_server_trunking()
2271 status = ops->detect_trunking(clp, result, cred); in nfs4_discover_server_trunking()
2272 put_cred(cred); in nfs4_discover_server_trunking()
2462 const struct cred *cred; in nfs4_reset_session() local
2470 cred = nfs4_get_clid_cred(clp); in nfs4_reset_session()
2471 status = nfs4_proc_destroy_session(clp->cl_session, cred); in nfs4_reset_session()
2489 status = nfs4_proc_create_session(clp, cred); in nfs4_reset_session()
2500 put_cred(cred); in nfs4_reset_session()
2506 const struct cred *cred; in nfs4_bind_conn_to_session() local
2514 cred = nfs4_get_clid_cred(clp); in nfs4_bind_conn_to_session()
2515 ret = nfs4_proc_bind_conn_to_session(clp, cred); in nfs4_bind_conn_to_session()
2516 put_cred(cred); in nfs4_bind_conn_to_session()