diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-26 00:53:49 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-29 02:26:28 -0500 |
commit | 5e4424af9a1f062c6451681dff24a26e27741cc6 (patch) | |
tree | fcba54a8fc2d94c1d691ab5b8b956ac71b5cb8d4 /fs/nfs | |
parent | ff2d7db848f8db7cade39e55f78f86d77e0de01a (diff) |
SUNRPC: Remove now-redundant RCU-safe rpc_task free path
Now that we've tightened up the locking rules for RPC queue wakeups, we can
remove the RCU-safe kfree calls...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/read.c | 8 | ||||
-rw-r--r-- | fs/nfs/write.c | 16 |
2 files changed, 3 insertions, 21 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 87546cd277d5..be9e8270f4d7 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -58,19 +58,13 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) | |||
58 | return p; | 58 | return p; |
59 | } | 59 | } |
60 | 60 | ||
61 | static void nfs_readdata_rcu_free(struct rcu_head *head) | 61 | static void nfs_readdata_free(struct nfs_read_data *p) |
62 | { | 62 | { |
63 | struct nfs_read_data *p = container_of(head, struct nfs_read_data, task.u.tk_rcu); | ||
64 | if (p && (p->pagevec != &p->page_array[0])) | 63 | if (p && (p->pagevec != &p->page_array[0])) |
65 | kfree(p->pagevec); | 64 | kfree(p->pagevec); |
66 | mempool_free(p, nfs_rdata_mempool); | 65 | mempool_free(p, nfs_rdata_mempool); |
67 | } | 66 | } |
68 | 67 | ||
69 | static void nfs_readdata_free(struct nfs_read_data *rdata) | ||
70 | { | ||
71 | call_rcu_bh(&rdata->task.u.tk_rcu, nfs_readdata_rcu_free); | ||
72 | } | ||
73 | |||
74 | void nfs_readdata_release(void *data) | 68 | void nfs_readdata_release(void *data) |
75 | { | 69 | { |
76 | struct nfs_read_data *rdata = data; | 70 | struct nfs_read_data *rdata = data; |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 84495ef90728..30513029c00c 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -58,19 +58,13 @@ struct nfs_write_data *nfs_commit_alloc(void) | |||
58 | return p; | 58 | return p; |
59 | } | 59 | } |
60 | 60 | ||
61 | static void nfs_commit_rcu_free(struct rcu_head *head) | 61 | void nfs_commit_free(struct nfs_write_data *p) |
62 | { | 62 | { |
63 | struct nfs_write_data *p = container_of(head, struct nfs_write_data, task.u.tk_rcu); | ||
64 | if (p && (p->pagevec != &p->page_array[0])) | 63 | if (p && (p->pagevec != &p->page_array[0])) |
65 | kfree(p->pagevec); | 64 | kfree(p->pagevec); |
66 | mempool_free(p, nfs_commit_mempool); | 65 | mempool_free(p, nfs_commit_mempool); |
67 | } | 66 | } |
68 | 67 | ||
69 | void nfs_commit_free(struct nfs_write_data *wdata) | ||
70 | { | ||
71 | call_rcu_bh(&wdata->task.u.tk_rcu, nfs_commit_rcu_free); | ||
72 | } | ||
73 | |||
74 | struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) | 68 | struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) |
75 | { | 69 | { |
76 | struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, GFP_NOFS); | 70 | struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, GFP_NOFS); |
@@ -92,19 +86,13 @@ struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) | |||
92 | return p; | 86 | return p; |
93 | } | 87 | } |
94 | 88 | ||
95 | static void nfs_writedata_rcu_free(struct rcu_head *head) | 89 | static void nfs_writedata_free(struct nfs_write_data *p) |
96 | { | 90 | { |
97 | struct nfs_write_data *p = container_of(head, struct nfs_write_data, task.u.tk_rcu); | ||
98 | if (p && (p->pagevec != &p->page_array[0])) | 91 | if (p && (p->pagevec != &p->page_array[0])) |
99 | kfree(p->pagevec); | 92 | kfree(p->pagevec); |
100 | mempool_free(p, nfs_wdata_mempool); | 93 | mempool_free(p, nfs_wdata_mempool); |
101 | } | 94 | } |
102 | 95 | ||
103 | static void nfs_writedata_free(struct nfs_write_data *wdata) | ||
104 | { | ||
105 | call_rcu_bh(&wdata->task.u.tk_rcu, nfs_writedata_rcu_free); | ||
106 | } | ||
107 | |||
108 | void nfs_writedata_release(void *data) | 96 | void nfs_writedata_release(void *data) |
109 | { | 97 | { |
110 | struct nfs_write_data *wdata = data; | 98 | struct nfs_write_data *wdata = data; |