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
b8541786
Commit
b8541786
authored
Nov 25, 2011
by
Cong Wang
Committed by
Cong Wang
Mar 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunrpc: remove the second argument of k[un]map_atomic()
Signed-off-by:
Cong Wang
<
amwang@redhat.com
>
parent
6114eab5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
net/sunrpc/auth_gss/gss_krb5_wrap.c
net/sunrpc/auth_gss/gss_krb5_wrap.c
+2
-2
net/sunrpc/socklib.c
net/sunrpc/socklib.c
+2
-2
net/sunrpc/xdr.c
net/sunrpc/xdr.c
+10
-10
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/rpc_rdma.c
+4
-4
No files found.
net/sunrpc/auth_gss/gss_krb5_wrap.c
View file @
b8541786
...
@@ -82,9 +82,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize)
...
@@ -82,9 +82,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize)
>>
PAGE_CACHE_SHIFT
;
>>
PAGE_CACHE_SHIFT
;
unsigned
int
offset
=
(
buf
->
page_base
+
len
-
1
)
unsigned
int
offset
=
(
buf
->
page_base
+
len
-
1
)
&
(
PAGE_CACHE_SIZE
-
1
);
&
(
PAGE_CACHE_SIZE
-
1
);
ptr
=
kmap_atomic
(
buf
->
pages
[
last
]
,
KM_USER0
);
ptr
=
kmap_atomic
(
buf
->
pages
[
last
]);
pad
=
*
(
ptr
+
offset
);
pad
=
*
(
ptr
+
offset
);
kunmap_atomic
(
ptr
,
KM_USER0
);
kunmap_atomic
(
ptr
);
goto
out
;
goto
out
;
}
else
}
else
len
-=
buf
->
page_len
;
len
-=
buf
->
page_len
;
...
...
net/sunrpc/socklib.c
View file @
b8541786
...
@@ -114,7 +114,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
...
@@ -114,7 +114,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
}
}
len
=
PAGE_CACHE_SIZE
;
len
=
PAGE_CACHE_SIZE
;
kaddr
=
kmap_atomic
(
*
ppage
,
KM_SKB_SUNRPC_DATA
);
kaddr
=
kmap_atomic
(
*
ppage
);
if
(
base
)
{
if
(
base
)
{
len
-=
base
;
len
-=
base
;
if
(
pglen
<
len
)
if
(
pglen
<
len
)
...
@@ -127,7 +127,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
...
@@ -127,7 +127,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
ret
=
copy_actor
(
desc
,
kaddr
,
len
);
ret
=
copy_actor
(
desc
,
kaddr
,
len
);
}
}
flush_dcache_page
(
*
ppage
);
flush_dcache_page
(
*
ppage
);
kunmap_atomic
(
kaddr
,
KM_SKB_SUNRPC_DATA
);
kunmap_atomic
(
kaddr
);
copied
+=
ret
;
copied
+=
ret
;
if
(
ret
!=
len
||
!
desc
->
count
)
if
(
ret
!=
len
||
!
desc
->
count
)
goto
out
;
goto
out
;
...
...
net/sunrpc/xdr.c
View file @
b8541786
...
@@ -122,9 +122,9 @@ xdr_terminate_string(struct xdr_buf *buf, const u32 len)
...
@@ -122,9 +122,9 @@ xdr_terminate_string(struct xdr_buf *buf, const u32 len)
{
{
char
*
kaddr
;
char
*
kaddr
;
kaddr
=
kmap_atomic
(
buf
->
pages
[
0
]
,
KM_USER0
);
kaddr
=
kmap_atomic
(
buf
->
pages
[
0
]);
kaddr
[
buf
->
page_base
+
len
]
=
'\0'
;
kaddr
[
buf
->
page_base
+
len
]
=
'\0'
;
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
}
}
EXPORT_SYMBOL_GPL
(
xdr_terminate_string
);
EXPORT_SYMBOL_GPL
(
xdr_terminate_string
);
...
@@ -232,12 +232,12 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
...
@@ -232,12 +232,12 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
pgto_base
-=
copy
;
pgto_base
-=
copy
;
pgfrom_base
-=
copy
;
pgfrom_base
-=
copy
;
vto
=
kmap_atomic
(
*
pgto
,
KM_USER0
);
vto
=
kmap_atomic
(
*
pgto
);
vfrom
=
kmap_atomic
(
*
pgfrom
,
KM_USER1
);
vfrom
=
kmap_atomic
(
*
pgfrom
);
memmove
(
vto
+
pgto_base
,
vfrom
+
pgfrom_base
,
copy
);
memmove
(
vto
+
pgto_base
,
vfrom
+
pgfrom_base
,
copy
);
flush_dcache_page
(
*
pgto
);
flush_dcache_page
(
*
pgto
);
kunmap_atomic
(
vfrom
,
KM_USER1
);
kunmap_atomic
(
vfrom
);
kunmap_atomic
(
vto
,
KM_USER0
);
kunmap_atomic
(
vto
);
}
while
((
len
-=
copy
)
!=
0
);
}
while
((
len
-=
copy
)
!=
0
);
}
}
...
@@ -267,9 +267,9 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
...
@@ -267,9 +267,9 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
if
(
copy
>
len
)
if
(
copy
>
len
)
copy
=
len
;
copy
=
len
;
vto
=
kmap_atomic
(
*
pgto
,
KM_USER0
);
vto
=
kmap_atomic
(
*
pgto
);
memcpy
(
vto
+
pgbase
,
p
,
copy
);
memcpy
(
vto
+
pgbase
,
p
,
copy
);
kunmap_atomic
(
vto
,
KM_USER0
);
kunmap_atomic
(
vto
);
len
-=
copy
;
len
-=
copy
;
if
(
len
==
0
)
if
(
len
==
0
)
...
@@ -311,9 +311,9 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
...
@@ -311,9 +311,9 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
if
(
copy
>
len
)
if
(
copy
>
len
)
copy
=
len
;
copy
=
len
;
vfrom
=
kmap_atomic
(
*
pgfrom
,
KM_USER0
);
vfrom
=
kmap_atomic
(
*
pgfrom
);
memcpy
(
p
,
vfrom
+
pgbase
,
copy
);
memcpy
(
p
,
vfrom
+
pgbase
,
copy
);
kunmap_atomic
(
vfrom
,
KM_USER0
);
kunmap_atomic
(
vfrom
);
pgbase
+=
copy
;
pgbase
+=
copy
;
if
(
pgbase
==
PAGE_CACHE_SIZE
)
{
if
(
pgbase
==
PAGE_CACHE_SIZE
)
{
...
...
net/sunrpc/xprtrdma/rpc_rdma.c
View file @
b8541786
...
@@ -338,9 +338,9 @@ rpcrdma_inline_pullup(struct rpc_rqst *rqst, int pad)
...
@@ -338,9 +338,9 @@ rpcrdma_inline_pullup(struct rpc_rqst *rqst, int pad)
curlen
=
copy_len
;
curlen
=
copy_len
;
dprintk
(
"RPC: %s: page %d destp 0x%p len %d curlen %d
\n
"
,
dprintk
(
"RPC: %s: page %d destp 0x%p len %d curlen %d
\n
"
,
__func__
,
i
,
destp
,
copy_len
,
curlen
);
__func__
,
i
,
destp
,
copy_len
,
curlen
);
srcp
=
kmap_atomic
(
ppages
[
i
]
,
KM_SKB_SUNRPC_DATA
);
srcp
=
kmap_atomic
(
ppages
[
i
]);
memcpy
(
destp
,
srcp
+
page_base
,
curlen
);
memcpy
(
destp
,
srcp
+
page_base
,
curlen
);
kunmap_atomic
(
srcp
,
KM_SKB_SUNRPC_DATA
);
kunmap_atomic
(
srcp
);
rqst
->
rq_svec
[
0
].
iov_len
+=
curlen
;
rqst
->
rq_svec
[
0
].
iov_len
+=
curlen
;
destp
+=
curlen
;
destp
+=
curlen
;
copy_len
-=
curlen
;
copy_len
-=
curlen
;
...
@@ -639,10 +639,10 @@ rpcrdma_inline_fixup(struct rpc_rqst *rqst, char *srcp, int copy_len, int pad)
...
@@ -639,10 +639,10 @@ rpcrdma_inline_fixup(struct rpc_rqst *rqst, char *srcp, int copy_len, int pad)
dprintk
(
"RPC: %s: page %d"
dprintk
(
"RPC: %s: page %d"
" srcp 0x%p len %d curlen %d
\n
"
,
" srcp 0x%p len %d curlen %d
\n
"
,
__func__
,
i
,
srcp
,
copy_len
,
curlen
);
__func__
,
i
,
srcp
,
copy_len
,
curlen
);
destp
=
kmap_atomic
(
ppages
[
i
]
,
KM_SKB_SUNRPC_DATA
);
destp
=
kmap_atomic
(
ppages
[
i
]);
memcpy
(
destp
+
page_base
,
srcp
,
curlen
);
memcpy
(
destp
+
page_base
,
srcp
,
curlen
);
flush_dcache_page
(
ppages
[
i
]);
flush_dcache_page
(
ppages
[
i
]);
kunmap_atomic
(
destp
,
KM_SKB_SUNRPC_DATA
);
kunmap_atomic
(
destp
);
srcp
+=
curlen
;
srcp
+=
curlen
;
copy_len
-=
curlen
;
copy_len
-=
curlen
;
if
(
copy_len
==
0
)
if
(
copy_len
==
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