Skip to content

Commit

Permalink
fuse: cleanup request_end()
Browse files Browse the repository at this point in the history
Now that we atomically test having already done everything we no longer
need other protection.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
  • Loading branch information
Miklos Szeredi committed Jul 1, 2015
1 parent 365ae71 commit 1e6881c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,12 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
__releases(fc->lock)
{
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)) {
spin_unlock(&fc->lock);
return;
}

req->end = NULL;
spin_lock(&fiq->waitq.lock);
list_del_init(&req->intr_entry);
spin_unlock(&fiq->waitq.lock);
Expand All @@ -416,8 +414,8 @@ __releases(fc->lock)
}
spin_unlock(&fc->lock);
wake_up(&req->waitq);
if (end)
end(fc, req);
if (req->end)
req->end(fc, req);
fuse_put_request(fc, req);
}

Expand Down

0 comments on commit 1e6881c

Please sign in to comment.