Commit 5f657530 authored by Andy Adamson's avatar Andy Adamson Committed by Trond Myklebust

NFSv4 set open access operation call flag in nfs4_init_opendata_res

nfs4_open_recover_helper zeros the nfs4_opendata result structures, removing
the result access_request information which leads to an XDR decode error.

Move the setting of the result access_request field to nfs4_init_opendata_res
which sets all the other required nfs4_opendata result fields and is shared
between the open and recover open paths.
Signed-off-by: default avatarAndy Adamson <andros@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 8544a9dc
...@@ -840,6 +840,7 @@ static void nfs4_init_opendata_res(struct nfs4_opendata *p) ...@@ -840,6 +840,7 @@ static void nfs4_init_opendata_res(struct nfs4_opendata *p)
p->o_res.seqid = p->o_arg.seqid; p->o_res.seqid = p->o_arg.seqid;
p->c_res.seqid = p->c_arg.seqid; p->c_res.seqid = p->c_arg.seqid;
p->o_res.server = p->o_arg.server; p->o_res.server = p->o_arg.server;
p->o_res.access_request = p->o_arg.access;
nfs_fattr_init(&p->f_attr); nfs_fattr_init(&p->f_attr);
nfs_fattr_init_names(&p->f_attr, &p->owner_name, &p->group_name); nfs_fattr_init_names(&p->f_attr, &p->owner_name, &p->group_name);
} }
...@@ -875,7 +876,6 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, ...@@ -875,7 +876,6 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry,
* are cached */ * are cached */
p->o_arg.access = NFS4_ACCESS_READ | NFS4_ACCESS_MODIFY | p->o_arg.access = NFS4_ACCESS_READ | NFS4_ACCESS_MODIFY |
NFS4_ACCESS_EXTEND | NFS4_ACCESS_EXECUTE; NFS4_ACCESS_EXTEND | NFS4_ACCESS_EXECUTE;
p->o_res.access_request = p->o_arg.access;
} }
p->o_arg.clientid = server->nfs_client->cl_clientid; p->o_arg.clientid = server->nfs_client->cl_clientid;
p->o_arg.id.create_time = ktime_to_ns(sp->so_seqid.create_time); p->o_arg.id.create_time = ktime_to_ns(sp->so_seqid.create_time);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment