aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2016-10-03 20:09:35 -0700
committerNikolaus Rath <Nikolaus@rath.org>2016-10-03 23:01:46 -0700
commit292fb198f108f46458008066827da965be8a4334 (patch)
tree5d8251ddd05210e2423f753602d6ddc4c866df62 /lib
parentea471967c94035287cebc13ba6e24f6cda6daafd (diff)
downloadlibfuse-292fb198f108f46458008066827da965be8a4334.tar.gz
Store struct fuse_session* in struct fuse_req
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse_i.h2
-rw-r--r--lib/fuse_lowlevel.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/fuse_i.h b/lib/fuse_i.h
index c4d0709..16a96d9 100644
--- a/lib/fuse_i.h
+++ b/lib/fuse_i.h
@@ -31,9 +31,9 @@ struct fuse_chan {
int fd;
};
-
struct fuse_req {
struct fuse_ll *f;
+ struct fuse_session *se;
uint64_t unique;
int ctr;
pthread_mutex_t lock;
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 375ac69..82cbe06 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -144,7 +144,7 @@ void fuse_free_req(fuse_req_t req)
destroy_req(req);
}
-static struct fuse_req *fuse_ll_alloc_req(struct fuse_ll *f)
+static struct fuse_req *fuse_ll_alloc_req(struct fuse_session *se)
{
struct fuse_req *req;
@@ -152,7 +152,8 @@ static struct fuse_req *fuse_ll_alloc_req(struct fuse_ll *f)
if (req == NULL) {
fprintf(stderr, "fuse: failed to allocate request\n");
} else {
- req->f = f;
+ req->f = se->f;
+ req->se = se;
req->ctr = 1;
list_init_req(req);
fuse_mutex_init(&req->lock);
@@ -1075,7 +1076,7 @@ static void do_batch_forget(fuse_req_t req, fuse_ino_t nodeid,
struct fuse_forget_one *forget = &param[i];
struct fuse_req *dummy_req;
- dummy_req = fuse_ll_alloc_req(req->f);
+ dummy_req = fuse_ll_alloc_req(req->se);
if (dummy_req == NULL)
break;
@@ -2488,7 +2489,7 @@ void fuse_session_process_buf_int(struct fuse_session *se,
(unsigned long long) in->nodeid, buf->size, in->pid);
}
- req = fuse_ll_alloc_req(f);
+ req = fuse_ll_alloc_req(se);
if (req == NULL) {
struct fuse_out_header out = {
.unique = in->unique,