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
696e38df
Commit
696e38df
authored
Jun 25, 2007
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SUNRPC: replace casts in auth_unix.c with container_of()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
5fe4755e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
net/sunrpc/auth_unix.c
net/sunrpc/auth_unix.c
+6
-4
No files found.
net/sunrpc/auth_unix.c
View file @
696e38df
...
...
@@ -89,12 +89,14 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
cred
->
uc_gids
[
i
]
=
NOGROUP
;
}
return
(
struct
rpc_cred
*
)
cred
;
return
&
cred
->
uc_base
;
}
static
void
unx_destroy_cred
(
struct
rpc_cred
*
cred
)
unx_destroy_cred
(
struct
rpc_cred
*
r
cred
)
{
struct
unx_cred
*
cred
=
container_of
(
rcred
,
struct
unx_cred
,
uc_base
);
kfree
(
cred
);
}
...
...
@@ -106,7 +108,7 @@ unx_destroy_cred(struct rpc_cred *cred)
static
int
unx_match
(
struct
auth_cred
*
acred
,
struct
rpc_cred
*
rcred
,
int
flags
)
{
struct
unx_cred
*
cred
=
(
struct
unx_cred
*
)
rcred
;
struct
unx_cred
*
cred
=
container_of
(
rcred
,
struct
unx_cred
,
uc_base
)
;
int
i
;
if
(
!
(
flags
&
RPCAUTH_LOOKUP_ROOTCREDS
))
{
...
...
@@ -137,7 +139,7 @@ static __be32 *
unx_marshal
(
struct
rpc_task
*
task
,
__be32
*
p
)
{
struct
rpc_clnt
*
clnt
=
task
->
tk_client
;
struct
unx_cred
*
cred
=
(
struct
unx_cred
*
)
task
->
tk_msg
.
rpc_cred
;
struct
unx_cred
*
cred
=
container_of
(
task
->
tk_msg
.
rpc_cred
,
struct
unx_cred
,
uc_base
)
;
__be32
*
base
,
*
hold
;
int
i
;
...
...
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