simplifying nfs41_delegate_open args
This commit is contained in:
parent
7b07dcebb8
commit
dcde6457e7
3 changed files with 8 additions and 14 deletions
|
|
@ -440,15 +440,15 @@ static int delegation_truncate(
|
||||||
}
|
}
|
||||||
|
|
||||||
int nfs41_delegate_open(
|
int nfs41_delegate_open(
|
||||||
IN nfs41_client *client,
|
IN nfs41_open_state *state,
|
||||||
IN nfs41_path_fh *file,
|
|
||||||
IN uint32_t create,
|
IN uint32_t create,
|
||||||
IN uint32_t mode,
|
IN uint32_t mode,
|
||||||
IN uint32_t access,
|
|
||||||
IN uint32_t deny,
|
|
||||||
OUT nfs41_delegation_state **deleg_out,
|
|
||||||
OUT nfs41_file_info *info)
|
OUT nfs41_file_info *info)
|
||||||
{
|
{
|
||||||
|
nfs41_client *client = state->session->client;
|
||||||
|
nfs41_path_fh *file = &state->file;
|
||||||
|
uint32_t access = state->share_access;
|
||||||
|
uint32_t deny = state->share_deny;
|
||||||
nfs41_delegation_state *deleg;
|
nfs41_delegation_state *deleg;
|
||||||
stateid_arg stateid;
|
stateid_arg stateid;
|
||||||
int status;
|
int status;
|
||||||
|
|
@ -496,7 +496,7 @@ int nfs41_delegate_open(
|
||||||
|
|
||||||
/* TODO: check access against deleg->state.permissions or send ACCESS */
|
/* TODO: check access against deleg->state.permissions or send ACCESS */
|
||||||
|
|
||||||
*deleg_out = deleg;
|
state->delegation.state = deleg;
|
||||||
status = NFS4_OK;
|
status = NFS4_OK;
|
||||||
out:
|
out:
|
||||||
return status;
|
return status;
|
||||||
|
|
|
||||||
|
|
@ -55,13 +55,9 @@ int nfs41_delegation_granted(
|
||||||
OUT nfs41_delegation_state **deleg_out);
|
OUT nfs41_delegation_state **deleg_out);
|
||||||
|
|
||||||
int nfs41_delegate_open(
|
int nfs41_delegate_open(
|
||||||
IN nfs41_client *client,
|
IN nfs41_open_state *state,
|
||||||
IN nfs41_path_fh *file,
|
|
||||||
IN uint32_t create,
|
IN uint32_t create,
|
||||||
IN uint32_t mode,
|
IN uint32_t mode,
|
||||||
IN uint32_t access,
|
|
||||||
IN uint32_t deny,
|
|
||||||
OUT nfs41_delegation_state **deleg_out,
|
|
||||||
OUT nfs41_file_info *info);
|
OUT nfs41_file_info *info);
|
||||||
|
|
||||||
int nfs41_delegation_to_open(
|
int nfs41_delegation_to_open(
|
||||||
|
|
|
||||||
|
|
@ -237,9 +237,7 @@ static int open_or_delegate(
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
/* check for existing delegation */
|
/* check for existing delegation */
|
||||||
status = nfs41_delegate_open(state->session->client, &state->file,
|
status = nfs41_delegate_open(state, create, mode, info);
|
||||||
create, mode, state->share_access, state->share_deny,
|
|
||||||
&state->delegation.state, info);
|
|
||||||
|
|
||||||
/* get an open stateid if we have no delegation stateid */
|
/* get an open stateid if we have no delegation stateid */
|
||||||
if (status)
|
if (status)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue