diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/dev.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/dev.c b/kernel/dev.c index 72fdba4..6d082dc 100644 --- a/kernel/dev.c +++ b/kernel/dev.c @@ -187,13 +187,13 @@ void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req) { req->issync = 0; - spin_lock(&fuse_lock); if (fc->file) { + spin_lock(&fuse_lock); list_add_tail(&req->list, &fc->pending); wake_up(&fc->waitq); + spin_unlock(&fuse_lock); } else fuse_put_request(fc, req); - spin_unlock(&fuse_lock); } void request_send_nonblock(struct fuse_conn *fc, struct fuse_req *req, @@ -610,8 +610,11 @@ static void end_requests(struct fuse_conn *fc, struct list_head *head) /* Unlocks fuse_lock: */ request_end(fc, req); spin_lock(&fuse_lock); - } else + } else { + spin_unlock(&fuse_lock); fuse_put_request(fc, req); + spin_lock(&fuse_lock); + } } } |