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
Kirill Smelkov
linux
Commits
9fa1cb39
Commit
9fa1cb39
authored
Mar 10, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aio: aio_nr_lock is taken only synchronously now
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
2dd542b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fs/aio.c
fs/aio.c
+3
-3
No files found.
fs/aio.c
View file @
9fa1cb39
...
@@ -278,14 +278,14 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
...
@@ -278,14 +278,14 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
goto
out_freectx
;
goto
out_freectx
;
/* limit the number of system wide aios */
/* limit the number of system wide aios */
spin_lock
_bh
(
&
aio_nr_lock
);
spin_lock
(
&
aio_nr_lock
);
if
(
aio_nr
+
nr_events
>
aio_max_nr
||
if
(
aio_nr
+
nr_events
>
aio_max_nr
||
aio_nr
+
nr_events
<
aio_nr
)
{
aio_nr
+
nr_events
<
aio_nr
)
{
spin_unlock
_bh
(
&
aio_nr_lock
);
spin_unlock
(
&
aio_nr_lock
);
goto
out_cleanup
;
goto
out_cleanup
;
}
}
aio_nr
+=
ctx
->
max_reqs
;
aio_nr
+=
ctx
->
max_reqs
;
spin_unlock
_bh
(
&
aio_nr_lock
);
spin_unlock
(
&
aio_nr_lock
);
/* now link into global list. */
/* now link into global list. */
spin_lock
(
&
mm
->
ioctx_lock
);
spin_lock
(
&
mm
->
ioctx_lock
);
...
...
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