提交 42dc6211 编写于 作者: M Miklos Szeredi

fuse: fix background request if not connected

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: NMiklos Szeredi <mszeredi@suse.cz>
Reviewed-by: NAshish Samant <ashish.samant@oracle.com>
上级 0ad0b325
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册