diff options
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 99325547604f..4526da8907c6 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -154,28 +154,6 @@ void fuse_release_background(struct fuse_req *req) | |||
154 | spin_unlock(&fuse_lock); | 154 | spin_unlock(&fuse_lock); |
155 | } | 155 | } |
156 | 156 | ||
157 | static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) | ||
158 | { | ||
159 | int i; | ||
160 | struct fuse_init_out *arg = &req->misc.init_out; | ||
161 | |||
162 | if (req->out.h.error || arg->major != FUSE_KERNEL_VERSION) | ||
163 | fc->conn_error = 1; | ||
164 | else { | ||
165 | fc->minor = arg->minor; | ||
166 | fc->max_write = arg->minor < 5 ? 4096 : arg->max_write; | ||
167 | } | ||
168 | |||
169 | /* After INIT reply is received other requests can go | ||
170 | out. So do (FUSE_MAX_OUTSTANDING - 1) number of | ||
171 | up()s on outstanding_sem. The last up() is done in | ||
172 | fuse_putback_request() */ | ||
173 | for (i = 1; i < FUSE_MAX_OUTSTANDING; i++) | ||
174 | up(&fc->outstanding_sem); | ||
175 | |||
176 | fuse_put_request(fc, req); | ||
177 | } | ||
178 | |||
179 | /* | 157 | /* |
180 | * This function is called when a request is finished. Either a reply | 158 | * This function is called when a request is finished. Either a reply |
181 | * has arrived or it was interrupted (and not yet sent) or some error | 159 | * has arrived or it was interrupted (and not yet sent) or some error |
@@ -366,29 +344,6 @@ void request_send_background(struct fuse_conn *fc, struct fuse_req *req) | |||
366 | request_send_nowait(fc, req); | 344 | request_send_nowait(fc, req); |
367 | } | 345 | } |
368 | 346 | ||
369 | void fuse_send_init(struct fuse_conn *fc) | ||
370 | { | ||
371 | /* This is called from fuse_read_super() so there's guaranteed | ||
372 | to be exactly one request available */ | ||
373 | struct fuse_req *req = fuse_get_request(fc); | ||
374 | struct fuse_init_in *arg = &req->misc.init_in; | ||
375 | arg->major = FUSE_KERNEL_VERSION; | ||
376 | arg->minor = FUSE_KERNEL_MINOR_VERSION; | ||
377 | req->in.h.opcode = FUSE_INIT; | ||
378 | req->in.numargs = 1; | ||
379 | req->in.args[0].size = sizeof(*arg); | ||
380 | req->in.args[0].value = arg; | ||
381 | req->out.numargs = 1; | ||
382 | /* Variable length arguement used for backward compatibility | ||
383 | with interface version < 7.5. Rest of init_out is zeroed | ||
384 | by do_get_request(), so a short reply is not a problem */ | ||
385 | req->out.argvar = 1; | ||
386 | req->out.args[0].size = sizeof(struct fuse_init_out); | ||
387 | req->out.args[0].value = &req->misc.init_out; | ||
388 | req->end = process_init_reply; | ||
389 | request_send_background(fc, req); | ||
390 | } | ||
391 | |||
392 | /* | 347 | /* |
393 | * Lock the request. Up to the next unlock_request() there mustn't be | 348 | * Lock the request. Up to the next unlock_request() there mustn't be |
394 | * anything that could cause a page-fault. If the request was already | 349 | * anything that could cause a page-fault. If the request was already |