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
58bda1da
Commit
58bda1da
authored
Feb 02, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse/dev: use atomic maps
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
8ffcb32e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fs/fuse/dev.c
fs/fuse/dev.c
+5
-5
No files found.
fs/fuse/dev.c
View file @
58bda1da
...
@@ -669,13 +669,13 @@ static void fuse_copy_finish(struct fuse_copy_state *cs)
...
@@ -669,13 +669,13 @@ static void fuse_copy_finish(struct fuse_copy_state *cs)
if
(
!
cs
->
write
)
{
if
(
!
cs
->
write
)
{
buf
->
ops
->
unmap
(
cs
->
pipe
,
buf
,
cs
->
mapaddr
);
buf
->
ops
->
unmap
(
cs
->
pipe
,
buf
,
cs
->
mapaddr
);
}
else
{
}
else
{
kunmap
(
buf
->
page
);
kunmap
_atomic
(
cs
->
mapaddr
);
buf
->
len
=
PAGE_SIZE
-
cs
->
len
;
buf
->
len
=
PAGE_SIZE
-
cs
->
len
;
}
}
cs
->
currbuf
=
NULL
;
cs
->
currbuf
=
NULL
;
cs
->
mapaddr
=
NULL
;
cs
->
mapaddr
=
NULL
;
}
else
if
(
cs
->
mapaddr
)
{
}
else
if
(
cs
->
mapaddr
)
{
kunmap
(
cs
->
pg
);
kunmap
_atomic
(
cs
->
mapaddr
);
if
(
cs
->
write
)
{
if
(
cs
->
write
)
{
flush_dcache_page
(
cs
->
pg
);
flush_dcache_page
(
cs
->
pg
);
set_page_dirty_lock
(
cs
->
pg
);
set_page_dirty_lock
(
cs
->
pg
);
...
@@ -706,7 +706,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
...
@@ -706,7 +706,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
BUG_ON
(
!
cs
->
nr_segs
);
BUG_ON
(
!
cs
->
nr_segs
);
cs
->
currbuf
=
buf
;
cs
->
currbuf
=
buf
;
cs
->
mapaddr
=
buf
->
ops
->
map
(
cs
->
pipe
,
buf
,
0
);
cs
->
mapaddr
=
buf
->
ops
->
map
(
cs
->
pipe
,
buf
,
1
);
cs
->
len
=
buf
->
len
;
cs
->
len
=
buf
->
len
;
cs
->
buf
=
cs
->
mapaddr
+
buf
->
offset
;
cs
->
buf
=
cs
->
mapaddr
+
buf
->
offset
;
cs
->
pipebufs
++
;
cs
->
pipebufs
++
;
...
@@ -726,7 +726,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
...
@@ -726,7 +726,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
buf
->
len
=
0
;
buf
->
len
=
0
;
cs
->
currbuf
=
buf
;
cs
->
currbuf
=
buf
;
cs
->
mapaddr
=
kmap
(
page
);
cs
->
mapaddr
=
kmap
_atomic
(
page
);
cs
->
buf
=
cs
->
mapaddr
;
cs
->
buf
=
cs
->
mapaddr
;
cs
->
len
=
PAGE_SIZE
;
cs
->
len
=
PAGE_SIZE
;
cs
->
pipebufs
++
;
cs
->
pipebufs
++
;
...
@@ -745,7 +745,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
...
@@ -745,7 +745,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
return
err
;
return
err
;
BUG_ON
(
err
!=
1
);
BUG_ON
(
err
!=
1
);
offset
=
cs
->
addr
%
PAGE_SIZE
;
offset
=
cs
->
addr
%
PAGE_SIZE
;
cs
->
mapaddr
=
kmap
(
cs
->
pg
);
cs
->
mapaddr
=
kmap
_atomic
(
cs
->
pg
);
cs
->
buf
=
cs
->
mapaddr
+
offset
;
cs
->
buf
=
cs
->
mapaddr
+
offset
;
cs
->
len
=
min
(
PAGE_SIZE
-
offset
,
cs
->
seglen
);
cs
->
len
=
min
(
PAGE_SIZE
-
offset
,
cs
->
seglen
);
cs
->
seglen
-=
cs
->
len
;
cs
->
seglen
-=
cs
->
len
;
...
...
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