diff options
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 85a23bb524f7..225388f54ae7 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -293,8 +293,7 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
293 | wake_up(&req->waitq); | 293 | wake_up(&req->waitq); |
294 | if (end) | 294 | if (end) |
295 | end(fc, req); | 295 | end(fc, req); |
296 | else | 296 | fuse_put_request(fc, req); |
297 | fuse_put_request(fc, req); | ||
298 | } | 297 | } |
299 | 298 | ||
300 | static void wait_answer_interruptible(struct fuse_conn *fc, | 299 | static void wait_answer_interruptible(struct fuse_conn *fc, |
@@ -1006,11 +1005,11 @@ static void end_io_requests(struct fuse_conn *fc) | |||
1006 | wake_up(&req->waitq); | 1005 | wake_up(&req->waitq); |
1007 | if (end) { | 1006 | if (end) { |
1008 | req->end = NULL; | 1007 | req->end = NULL; |
1009 | /* The end function will consume this reference */ | ||
1010 | __fuse_get_request(req); | 1008 | __fuse_get_request(req); |
1011 | spin_unlock(&fc->lock); | 1009 | spin_unlock(&fc->lock); |
1012 | wait_event(req->waitq, !req->locked); | 1010 | wait_event(req->waitq, !req->locked); |
1013 | end(fc, req); | 1011 | end(fc, req); |
1012 | fuse_put_request(fc, req); | ||
1014 | spin_lock(&fc->lock); | 1013 | spin_lock(&fc->lock); |
1015 | } | 1014 | } |
1016 | } | 1015 | } |