Skip to content

Commit

Permalink
fuse: fix background request if not connected
Browse files Browse the repository at this point in the history
request_end() expects fc->num_background and fc->active_background to have
been incremented, which is not the case in fuse_request_send_nowait()
failure path.  So instead just call the ->end() callback (which is actually
set by all callers).

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 0ad0b32 commit 42dc621
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,16 @@ static void fuse_request_send_nowait_locked(struct fuse_conn *fc,

static void fuse_request_send_nowait(struct fuse_conn *fc, struct fuse_req *req)
{
BUG_ON(!req->end);
spin_lock(&fc->lock);
if (fc->connected) {
fuse_request_send_nowait_locked(fc, req);
spin_unlock(&fc->lock);
} else {
spin_unlock(&fc->lock);
req->out.h.error = -ENOTCONN;
request_end(fc, req);
req->end(fc, req);
fuse_put_request(fc, req);
}
}

Expand Down

0 comments on commit 42dc621

Please sign in to comment.