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
a0ff86b8
Commit
a0ff86b8
authored
Aug 17, 2003
by
Chas Williams
Committed by
Stephen Hemminger
Aug 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: remove MOD_* used as semaphore; convert others to new style
parent
b6301f43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
net/atm/pppoatm.c
net/atm/pppoatm.c
+3
-5
No files found.
net/atm/pppoatm.c
View file @
a0ff86b8
...
...
@@ -132,7 +132,7 @@ static void pppoatm_unassign_vcc(struct atm_vcc *atmvcc)
atmvcc
->
user_back
=
NULL
;
kfree
(
pvcc
);
/* Gee, I hope we have the big kernel lock here... */
MOD_DEC_USE_COUNT
;
module_put
(
THIS_MODULE
)
;
}
/* Called when an AAL5 PDU comes in */
...
...
@@ -286,12 +286,9 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, unsigned long arg)
if
(
be
.
encaps
!=
PPPOATM_ENCAPS_AUTODETECT
&&
be
.
encaps
!=
PPPOATM_ENCAPS_VC
&&
be
.
encaps
!=
PPPOATM_ENCAPS_LLC
)
return
-
EINVAL
;
MOD_INC_USE_COUNT
;
pvcc
=
kmalloc
(
sizeof
(
*
pvcc
),
GFP_KERNEL
);
if
(
pvcc
==
NULL
)
{
MOD_DEC_USE_COUNT
;
if
(
pvcc
==
NULL
)
return
-
ENOMEM
;
}
memset
(
pvcc
,
0
,
sizeof
(
*
pvcc
));
pvcc
->
atmvcc
=
atmvcc
;
pvcc
->
old_push
=
atmvcc
->
push
;
...
...
@@ -310,6 +307,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, unsigned long arg)
atmvcc
->
user_back
=
pvcc
;
atmvcc
->
push
=
pppoatm_push
;
atmvcc
->
pop
=
pppoatm_pop
;
(
void
)
try_module_get
(
THIS_MODULE
);
return
0
;
}
...
...
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