Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e3a535e1
Commit
e3a535e1
authored
Jul 19, 2007
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Fix the nfsv4 readlink reply buffer alignment
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
d6ac02df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+11
-10
No files found.
fs/nfs/nfs4xdr.c
View file @
e3a535e1
...
@@ -1201,21 +1201,11 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg
...
@@ -1201,21 +1201,11 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg
static
int
encode_readlink
(
struct
xdr_stream
*
xdr
,
const
struct
nfs4_readlink
*
readlink
,
struct
rpc_rqst
*
req
)
static
int
encode_readlink
(
struct
xdr_stream
*
xdr
,
const
struct
nfs4_readlink
*
readlink
,
struct
rpc_rqst
*
req
)
{
{
struct
rpc_auth
*
auth
=
req
->
rq_task
->
tk_msg
.
rpc_cred
->
cr_auth
;
unsigned
int
replen
;
__be32
*
p
;
__be32
*
p
;
RESERVE_SPACE
(
4
);
RESERVE_SPACE
(
4
);
WRITE32
(
OP_READLINK
);
WRITE32
(
OP_READLINK
);
/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
* + OP_READLINK + status + string length = 8
*/
replen
=
(
RPC_REPHDRSIZE
+
auth
->
au_rslack
+
8
)
<<
2
;
xdr_inline_pages
(
&
req
->
rq_rcv_buf
,
replen
,
readlink
->
pages
,
readlink
->
pgbase
,
readlink
->
pglen
);
return
0
;
return
0
;
}
}
...
@@ -1781,6 +1771,8 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
...
@@ -1781,6 +1771,8 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
struct
compound_hdr
hdr
=
{
struct
compound_hdr
hdr
=
{
.
nops
=
2
,
.
nops
=
2
,
};
};
struct
rpc_auth
*
auth
=
req
->
rq_task
->
tk_msg
.
rpc_cred
->
cr_auth
;
unsigned
int
replen
;
int
status
;
int
status
;
xdr_init_encode
(
&
xdr
,
&
req
->
rq_snd_buf
,
p
);
xdr_init_encode
(
&
xdr
,
&
req
->
rq_snd_buf
,
p
);
...
@@ -1789,6 +1781,15 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
...
@@ -1789,6 +1781,15 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
if
(
status
)
if
(
status
)
goto
out
;
goto
out
;
status
=
encode_readlink
(
&
xdr
,
args
,
req
);
status
=
encode_readlink
(
&
xdr
,
args
,
req
);
/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
* + OP_READLINK + status + string length = 8
*/
replen
=
(
RPC_REPHDRSIZE
+
auth
->
au_rslack
+
NFS4_dec_readlink_sz
)
<<
2
;
xdr_inline_pages
(
&
req
->
rq_rcv_buf
,
replen
,
args
->
pages
,
args
->
pgbase
,
args
->
pglen
);
out:
out:
return
status
;
return
status
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment