Commit 1e6881c3 authored by Miklos Szeredi's avatar Miklos Szeredi

fuse: cleanup request_end()

Now that we atomically test having already done everything we no longer
need other protection.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Reviewed-by: default avatarAshish Samant <ashish.samant@oracle.com>
parent 365ae710
...@@ -383,14 +383,12 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) ...@@ -383,14 +383,12 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
__releases(fc->lock) __releases(fc->lock)
{ {
struct fuse_iqueue *fiq = &fc->iq; struct fuse_iqueue *fiq = &fc->iq;
void (*end) (struct fuse_conn *, struct fuse_req *) = req->end;
if (test_and_set_bit(FR_FINISHED, &req->flags)) { if (test_and_set_bit(FR_FINISHED, &req->flags)) {
spin_unlock(&fc->lock); spin_unlock(&fc->lock);
return; return;
} }
req->end = NULL;
spin_lock(&fiq->waitq.lock); spin_lock(&fiq->waitq.lock);
list_del_init(&req->intr_entry); list_del_init(&req->intr_entry);
spin_unlock(&fiq->waitq.lock); spin_unlock(&fiq->waitq.lock);
...@@ -416,8 +414,8 @@ __releases(fc->lock) ...@@ -416,8 +414,8 @@ __releases(fc->lock)
} }
spin_unlock(&fc->lock); spin_unlock(&fc->lock);
wake_up(&req->waitq); wake_up(&req->waitq);
if (end) if (req->end)
end(fc, req); req->end(fc, req);
fuse_put_request(fc, req); fuse_put_request(fc, req);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment