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
c1f25dc7
Commit
c1f25dc7
authored
Apr 22, 2003
by
David S. Miller
Committed by
Arnaldo Carvalho de Melo
Apr 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Do not let GCC reload pointers after NULL checks.
parent
43062f4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
net/socket.c
net/socket.c
+9
-4
No files found.
net/socket.c
View file @
c1f25dc7
...
@@ -149,10 +149,12 @@ static __inline__ void net_family_bug(int family)
...
@@ -149,10 +149,12 @@ static __inline__ void net_family_bug(int family)
int
net_family_get
(
int
family
)
int
net_family_get
(
int
family
)
{
{
struct
net_proto_family
*
prot
=
net_families
[
family
];
int
rc
=
1
;
int
rc
=
1
;
if
(
likely
(
net_families
[
family
]
!=
NULL
))
barrier
();
rc
=
try_module_get
(
net_families
[
family
]
->
owner
);
if
(
likely
(
prot
!=
NULL
))
rc
=
try_module_get
(
prot
->
owner
);
else
else
net_family_bug
(
family
);
net_family_bug
(
family
);
return
rc
;
return
rc
;
...
@@ -160,8 +162,11 @@ int net_family_get(int family)
...
@@ -160,8 +162,11 @@ int net_family_get(int family)
void
net_family_put
(
int
family
)
void
net_family_put
(
int
family
)
{
{
if
(
likely
(
net_families
[
family
]
!=
NULL
))
struct
net_proto_family
*
prot
=
net_families
[
family
];
module_put
(
net_families
[
family
]
->
owner
);
barrier
();
if
(
likely
(
prot
!=
NULL
))
module_put
(
prot
->
owner
);
else
else
net_family_bug
(
family
);
net_family_bug
(
family
);
}
}
...
...
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