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
dcdbd7b2
Commit
dcdbd7b2
authored
Apr 02, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/9p: remove (now-)unused helpers
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
21c9f5cc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
43 deletions
+1
-43
net/9p/trans_common.c
net/9p/trans_common.c
+1
-41
net/9p/trans_common.h
net/9p/trans_common.h
+0
-2
No files found.
net/9p/trans_common.c
View file @
dcdbd7b2
...
...
@@ -12,12 +12,8 @@
*
*/
#include <linux/
slab
.h>
#include <linux/
mm
.h>
#include <linux/module.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>
#include <linux/scatterlist.h>
#include "trans_common.h"
/**
* p9_release_req_pages - Release pages after the transaction.
...
...
@@ -31,39 +27,3 @@ void p9_release_pages(struct page **pages, int nr_pages)
put_page
(
pages
[
i
]);
}
EXPORT_SYMBOL
(
p9_release_pages
);
/**
* p9_nr_pages - Return number of pages needed to accommodate the payload.
*/
int
p9_nr_pages
(
char
*
data
,
int
len
)
{
unsigned
long
start_page
,
end_page
;
start_page
=
(
unsigned
long
)
data
>>
PAGE_SHIFT
;
end_page
=
((
unsigned
long
)
data
+
len
+
PAGE_SIZE
-
1
)
>>
PAGE_SHIFT
;
return
end_page
-
start_page
;
}
EXPORT_SYMBOL
(
p9_nr_pages
);
/**
* payload_gup - Translates user buffer into kernel pages and
* pins them either for read/write through get_user_pages_fast().
* @req: Request to be sent to server.
* @pdata_off: data offset into the first page after translation (gup).
* @pdata_len: Total length of the IO. gup may not return requested # of pages.
* @nr_pages: number of pages to accommodate the payload
* @rw: Indicates if the pages are for read or write.
*/
int
p9_payload_gup
(
char
*
data
,
int
*
nr_pages
,
struct
page
**
pages
,
int
write
)
{
int
nr_mapped_pages
;
nr_mapped_pages
=
get_user_pages_fast
((
unsigned
long
)
data
,
*
nr_pages
,
write
,
pages
);
if
(
nr_mapped_pages
<=
0
)
return
nr_mapped_pages
;
*
nr_pages
=
nr_mapped_pages
;
return
0
;
}
EXPORT_SYMBOL
(
p9_payload_gup
);
net/9p/trans_common.h
View file @
dcdbd7b2
...
...
@@ -13,5 +13,3 @@
*/
void
p9_release_pages
(
struct
page
**
,
int
);
int
p9_payload_gup
(
char
*
,
int
*
,
struct
page
**
,
int
);
int
p9_nr_pages
(
char
*
,
int
);
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