diff options
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index af639807524e..87250b6a8682 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -47,6 +47,14 @@ struct fuse_req *fuse_request_alloc(void) | |||
47 | return req; | 47 | return req; |
48 | } | 48 | } |
49 | 49 | ||
50 | struct fuse_req *fuse_request_alloc_nofs(void) | ||
51 | { | ||
52 | struct fuse_req *req = kmem_cache_alloc(fuse_req_cachep, GFP_NOFS); | ||
53 | if (req) | ||
54 | fuse_request_init(req); | ||
55 | return req; | ||
56 | } | ||
57 | |||
50 | void fuse_request_free(struct fuse_req *req) | 58 | void fuse_request_free(struct fuse_req *req) |
51 | { | 59 | { |
52 | kmem_cache_free(fuse_req_cachep, req); | 60 | kmem_cache_free(fuse_req_cachep, req); |
@@ -291,6 +299,7 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
291 | 299 | ||
292 | static void wait_answer_interruptible(struct fuse_conn *fc, | 300 | static void wait_answer_interruptible(struct fuse_conn *fc, |
293 | struct fuse_req *req) | 301 | struct fuse_req *req) |
302 | __releases(fc->lock) __acquires(fc->lock) | ||
294 | { | 303 | { |
295 | if (signal_pending(current)) | 304 | if (signal_pending(current)) |
296 | return; | 305 | return; |
@@ -307,8 +316,8 @@ static void queue_interrupt(struct fuse_conn *fc, struct fuse_req *req) | |||
307 | kill_fasync(&fc->fasync, SIGIO, POLL_IN); | 316 | kill_fasync(&fc->fasync, SIGIO, POLL_IN); |
308 | } | 317 | } |
309 | 318 | ||
310 | /* Called with fc->lock held. Releases, and then reacquires it. */ | ||
311 | static void request_wait_answer(struct fuse_conn *fc, struct fuse_req *req) | 319 | static void request_wait_answer(struct fuse_conn *fc, struct fuse_req *req) |
320 | __releases(fc->lock) __acquires(fc->lock) | ||
312 | { | 321 | { |
313 | if (!fc->no_interrupt) { | 322 | if (!fc->no_interrupt) { |
314 | /* Any signal may interrupt this */ | 323 | /* Any signal may interrupt this */ |
@@ -430,6 +439,17 @@ void request_send_background(struct fuse_conn *fc, struct fuse_req *req) | |||
430 | } | 439 | } |
431 | 440 | ||
432 | /* | 441 | /* |
442 | * Called under fc->lock | ||
443 | * | ||
444 | * fc->connected must have been checked previously | ||
445 | */ | ||
446 | void request_send_background_locked(struct fuse_conn *fc, struct fuse_req *req) | ||
447 | { | ||
448 | req->isreply = 1; | ||
449 | request_send_nowait_locked(fc, req); | ||
450 | } | ||
451 | |||
452 | /* | ||
433 | * Lock the request. Up to the next unlock_request() there mustn't be | 453 | * Lock the request. Up to the next unlock_request() there mustn't be |
434 | * anything that could cause a page-fault. If the request was already | 454 | * anything that could cause a page-fault. If the request was already |
435 | * aborted bail out. | 455 | * aborted bail out. |
@@ -968,6 +988,7 @@ static void end_requests(struct fuse_conn *fc, struct list_head *head) | |||
968 | * locked). | 988 | * locked). |
969 | */ | 989 | */ |
970 | static void end_io_requests(struct fuse_conn *fc) | 990 | static void end_io_requests(struct fuse_conn *fc) |
991 | __releases(fc->lock) __acquires(fc->lock) | ||
971 | { | 992 | { |
972 | while (!list_empty(&fc->io)) { | 993 | while (!list_empty(&fc->io)) { |
973 | struct fuse_req *req = | 994 | struct fuse_req *req = |