diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-02 23:11:36 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:28:29 -0400 |
commit | dcdbd7b269003bec7d729ca3fd143f93cf98f56e (patch) | |
tree | 027ec9c1eb0ac89c04df4c8de14fe6d2d304ab67 /net | |
parent | 21c9f5ccb103868c730aec6f8548e144ec397fed (diff) |
net/9p: remove (now-)unused helpers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/trans_common.c | 42 | ||||
-rw-r--r-- | net/9p/trans_common.h | 2 |
2 files changed, 1 insertions, 43 deletions
diff --git a/net/9p/trans_common.c b/net/9p/trans_common.c index 2ee3879161b1..38aa6345bdfa 100644 --- a/net/9p/trans_common.c +++ b/net/9p/trans_common.c | |||
@@ -12,12 +12,8 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <net/9p/9p.h> | ||
18 | #include <net/9p/client.h> | ||
19 | #include <linux/scatterlist.h> | ||
20 | #include "trans_common.h" | ||
21 | 17 | ||
22 | /** | 18 | /** |
23 | * p9_release_req_pages - Release pages after the transaction. | 19 | * p9_release_req_pages - Release pages after the transaction. |
@@ -31,39 +27,3 @@ void p9_release_pages(struct page **pages, int nr_pages) | |||
31 | put_page(pages[i]); | 27 | put_page(pages[i]); |
32 | } | 28 | } |
33 | EXPORT_SYMBOL(p9_release_pages); | 29 | EXPORT_SYMBOL(p9_release_pages); |
34 | |||
35 | /** | ||
36 | * p9_nr_pages - Return number of pages needed to accommodate the payload. | ||
37 | */ | ||
38 | int p9_nr_pages(char *data, int len) | ||
39 | { | ||
40 | unsigned long start_page, end_page; | ||
41 | start_page = (unsigned long)data >> PAGE_SHIFT; | ||
42 | end_page = ((unsigned long)data + len + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
43 | return end_page - start_page; | ||
44 | } | ||
45 | EXPORT_SYMBOL(p9_nr_pages); | ||
46 | |||
47 | /** | ||
48 | * payload_gup - Translates user buffer into kernel pages and | ||
49 | * pins them either for read/write through get_user_pages_fast(). | ||
50 | * @req: Request to be sent to server. | ||
51 | * @pdata_off: data offset into the first page after translation (gup). | ||
52 | * @pdata_len: Total length of the IO. gup may not return requested # of pages. | ||
53 | * @nr_pages: number of pages to accommodate the payload | ||
54 | * @rw: Indicates if the pages are for read or write. | ||
55 | */ | ||
56 | |||
57 | int p9_payload_gup(char *data, int *nr_pages, struct page **pages, int write) | ||
58 | { | ||
59 | int nr_mapped_pages; | ||
60 | |||
61 | nr_mapped_pages = get_user_pages_fast((unsigned long)data, | ||
62 | *nr_pages, write, pages); | ||
63 | if (nr_mapped_pages <= 0) | ||
64 | return nr_mapped_pages; | ||
65 | |||
66 | *nr_pages = nr_mapped_pages; | ||
67 | return 0; | ||
68 | } | ||
69 | EXPORT_SYMBOL(p9_payload_gup); | ||
diff --git a/net/9p/trans_common.h b/net/9p/trans_common.h index 173bb550a9eb..c43babb3f635 100644 --- a/net/9p/trans_common.h +++ b/net/9p/trans_common.h | |||
@@ -13,5 +13,3 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | void p9_release_pages(struct page **, int); | 15 | void p9_release_pages(struct page **, int); |
16 | int p9_payload_gup(char *, int *, struct page **, int); | ||
17 | int p9_nr_pages(char *, int); | ||