From: Nikolaus Rath Date: Tue, 4 Oct 2016 03:09:35 +0000 (-0700) Subject: Store struct fuse_session* in struct fuse_req X-Git-Tag: fuse-3.0.0rc1~95 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=292fb198f108f46458008066827da965be8a4334;p=qemu-gpiodev%2Flibfuse.git Store struct fuse_session* in struct fuse_req --- 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 = ¶m[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,