File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,13 @@ struct http_server_param {
12
12
13
13
extern int http_server_daemon (void * arg );
14
14
15
+ static inline void * http_buf_alloc (gfp_t gfp_mask , void * pool_data )
16
+ {
17
+ return kzalloc (RECV_BUFFER_SIZE , gfp_mask );
18
+ }
19
+
20
+ static inline void http_buf_free (void * element , void * pool_data )
21
+ {
22
+ kfree (element );
23
+ }
15
24
#endif
Original file line number Diff line number Diff line change @@ -157,26 +157,13 @@ static void close_listen_socket(struct socket *socket)
157
157
sock_release (socket );
158
158
}
159
159
160
-
161
- static void * http_buf_alloc (gfp_t gfp_mask , void * pool_data )
162
- {
163
- return kzalloc (RECV_BUFFER_SIZE , gfp_mask );
164
- }
165
-
166
- static void http_buf_free (void * element , void * pool_data )
167
- {
168
- kfree (element );
169
- }
170
-
171
160
static int __init khttpd_init (void )
172
161
{
173
162
if (!(http_buf_pool = mempool_create (POOL_MIN_NR , http_buf_alloc ,
174
163
http_buf_free , NULL ))) {
175
164
pr_err ("failed to create mempool\n" );
176
165
return - ENOMEM ;
177
166
}
178
-
179
-
180
167
int err = open_listen_socket (port , backlog , & listen_socket );
181
168
if (err < 0 ) {
182
169
pr_err ("can't open listen socket\n" );
You can’t perform that action at this time.
0 commit comments