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
b084fe4b
Commit
b084fe4b
authored
Nov 15, 2002
by
Andrew Morton
Committed by
Linus Torvalds
Nov 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kmap->kmap_atomic in mpage.c
Replace some kmaps in mpage.c with kmap_atomic.
parent
deda1b5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
fs/mpage.c
fs/mpage.c
+7
-4
No files found.
fs/mpage.c
View file @
b084fe4b
...
@@ -210,10 +210,11 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
...
@@ -210,10 +210,11 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
}
}
if
(
first_hole
!=
blocks_per_page
)
{
if
(
first_hole
!=
blocks_per_page
)
{
memset
(
kmap
(
page
)
+
(
first_hole
<<
blkbits
),
0
,
char
*
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
memset
(
kaddr
+
(
first_hole
<<
blkbits
),
0
,
PAGE_CACHE_SIZE
-
(
first_hole
<<
blkbits
));
PAGE_CACHE_SIZE
-
(
first_hole
<<
blkbits
));
flush_dcache_page
(
page
);
flush_dcache_page
(
page
);
kunmap
(
page
);
kunmap
_atomic
(
kaddr
,
KM_USER0
);
if
(
first_hole
==
0
)
{
if
(
first_hole
==
0
)
{
SetPageUptodate
(
page
);
SetPageUptodate
(
page
);
unlock_page
(
page
);
unlock_page
(
page
);
...
@@ -427,12 +428,14 @@ mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
...
@@ -427,12 +428,14 @@ mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
end_index
=
inode
->
i_size
>>
PAGE_CACHE_SHIFT
;
end_index
=
inode
->
i_size
>>
PAGE_CACHE_SHIFT
;
if
(
page
->
index
>=
end_index
)
{
if
(
page
->
index
>=
end_index
)
{
unsigned
offset
=
inode
->
i_size
&
(
PAGE_CACHE_SIZE
-
1
);
unsigned
offset
=
inode
->
i_size
&
(
PAGE_CACHE_SIZE
-
1
);
char
*
kaddr
;
if
(
page
->
index
>
end_index
||
!
offset
)
if
(
page
->
index
>
end_index
||
!
offset
)
goto
confused
;
goto
confused
;
memset
(
kmap
(
page
)
+
offset
,
0
,
PAGE_CACHE_SIZE
-
offset
);
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
memset
(
kaddr
+
offset
,
0
,
PAGE_CACHE_SIZE
-
offset
);
flush_dcache_page
(
page
);
flush_dcache_page
(
page
);
kunmap
(
page
);
kunmap
_atomic
(
kaddr
,
KM_USER0
);
}
}
page_is_mapped:
page_is_mapped:
...
...
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