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
d9349285
Commit
d9349285
authored
Nov 25, 2011
by
Cong Wang
Committed by
Cong Wang
Mar 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gfs2: remove the second argument of k[un]map_atomic()
Signed-off-by:
Cong Wang
<
amwang@redhat.com
>
parent
2408f6ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
fs/gfs2/aops.c
fs/gfs2/aops.c
+6
-6
fs/gfs2/lops.c
fs/gfs2/lops.c
+4
-4
fs/gfs2/quota.c
fs/gfs2/quota.c
+2
-2
No files found.
fs/gfs2/aops.c
View file @
d9349285
...
...
@@ -434,12 +434,12 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
if
(
error
)
return
error
;
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
page
);
if
(
dsize
>
(
dibh
->
b_size
-
sizeof
(
struct
gfs2_dinode
)))
dsize
=
(
dibh
->
b_size
-
sizeof
(
struct
gfs2_dinode
));
memcpy
(
kaddr
,
dibh
->
b_data
+
sizeof
(
struct
gfs2_dinode
),
dsize
);
memset
(
kaddr
+
dsize
,
0
,
PAGE_CACHE_SIZE
-
dsize
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
flush_dcache_page
(
page
);
brelse
(
dibh
);
SetPageUptodate
(
page
);
...
...
@@ -542,9 +542,9 @@ int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state,
page
=
read_cache_page
(
mapping
,
index
,
__gfs2_readpage
,
NULL
);
if
(
IS_ERR
(
page
))
return
PTR_ERR
(
page
);
p
=
kmap_atomic
(
page
,
KM_USER0
);
p
=
kmap_atomic
(
page
);
memcpy
(
buf
+
copied
,
p
+
offset
,
amt
);
kunmap_atomic
(
p
,
KM_USER0
);
kunmap_atomic
(
p
);
mark_page_accessed
(
page
);
page_cache_release
(
page
);
copied
+=
amt
;
...
...
@@ -788,11 +788,11 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
unsigned
char
*
buf
=
dibh
->
b_data
+
sizeof
(
struct
gfs2_dinode
);
BUG_ON
((
pos
+
len
)
>
(
dibh
->
b_size
-
sizeof
(
struct
gfs2_dinode
)));
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
page
);
memcpy
(
buf
+
pos
,
kaddr
+
pos
,
copied
);
memset
(
kaddr
+
pos
+
copied
,
0
,
len
-
copied
);
flush_dcache_page
(
page
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
if
(
!
PageUptodate
(
page
))
SetPageUptodate
(
page
);
...
...
fs/gfs2/lops.c
View file @
d9349285
...
...
@@ -553,11 +553,11 @@ static void gfs2_check_magic(struct buffer_head *bh)
__be32
*
ptr
;
clear_buffer_escaped
(
bh
);
kaddr
=
kmap_atomic
(
bh
->
b_page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
bh
->
b_page
);
ptr
=
kaddr
+
bh_offset
(
bh
);
if
(
*
ptr
==
cpu_to_be32
(
GFS2_MAGIC
))
set_buffer_escaped
(
bh
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
}
static
void
gfs2_write_blocks
(
struct
gfs2_sbd
*
sdp
,
struct
buffer_head
*
bh
,
...
...
@@ -594,10 +594,10 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh,
if
(
buffer_escaped
(
bd
->
bd_bh
))
{
void
*
kaddr
;
bh1
=
gfs2_log_get_buf
(
sdp
);
kaddr
=
kmap_atomic
(
bd
->
bd_bh
->
b_page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
bd
->
bd_bh
->
b_page
);
memcpy
(
bh1
->
b_data
,
kaddr
+
bh_offset
(
bd
->
bd_bh
),
bh1
->
b_size
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
*
(
__be32
*
)
bh1
->
b_data
=
0
;
clear_buffer_escaped
(
bd
->
bd_bh
);
unlock_buffer
(
bd
->
bd_bh
);
...
...
fs/gfs2/quota.c
View file @
d9349285
...
...
@@ -720,12 +720,12 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
gfs2_trans_add_bh
(
ip
->
i_gl
,
bh
,
0
);
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
page
);
if
(
offset
+
sizeof
(
struct
gfs2_quota
)
>
PAGE_CACHE_SIZE
)
nbytes
=
PAGE_CACHE_SIZE
-
offset
;
memcpy
(
kaddr
+
offset
,
ptr
,
nbytes
);
flush_dcache_page
(
page
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
unlock_page
(
page
);
page_cache_release
(
page
);
...
...
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