summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:25:56 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:25:56 +0200
commit42dc6211c54aa93e6a483469d07bd06f91713af7 (patch)
treee69ab7bc5a051a5bb75bb07248d9f89fe1c17751 /fs/fuse
parent0ad0b3255a08020eaf50e34ef0d6df5bdf5e09ed (diff)
downloadop-kernel-dev-42dc6211c54aa93e6a483469d07bd06f91713af7.zip
op-kernel-dev-42dc6211c54aa93e6a483469d07bd06f91713af7.tar.gz
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: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index c8b68ab..6aa4803 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -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);
}
}
OpenPOWER on IntegriCloud