From 9a261ca3a0ec6554b73eb23a299661832d4038c4 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 13 Feb 2026 19:45:39 -0600 Subject: [PATCH] Remove fuse_ll_pipe dead code --- libfuse/lib/fuse_i.h | 2 -- libfuse/lib/fuse_lowlevel.cpp | 52 ++--------------------------------- 2 files changed, 2 insertions(+), 52 deletions(-) diff --git a/libfuse/lib/fuse_i.h b/libfuse/lib/fuse_i.h index 53d6896d..64e4bc19 100644 --- a/libfuse/lib/fuse_i.h +++ b/libfuse/lib/fuse_i.h @@ -52,8 +52,6 @@ struct fuse_ll pthread_mutex_t lock; int got_init; int got_destroy; - pthread_key_t pipe_key; - int broken_splice_nonblock; uint64_t notify_ctr; struct fuse_notify_req notify_list; }; diff --git a/libfuse/lib/fuse_lowlevel.cpp b/libfuse/lib/fuse_lowlevel.cpp index f8a1d8f3..37a4a638 100644 --- a/libfuse/lib/fuse_lowlevel.cpp +++ b/libfuse/lib/fuse_lowlevel.cpp @@ -33,14 +33,6 @@ #include #include -#ifndef F_LINUX_SPECIFIC_BASE -#define F_LINUX_SPECIFIC_BASE 1024 -#endif -#ifndef F_SETPIPE_SZ -#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) -#endif - - #define PARAM(inarg) (((char*)(inarg)) + sizeof(*(inarg))) #define OFFSET_MAX 0x7fffffffffffffffLL @@ -436,22 +428,6 @@ fuse_reply_buf(fuse_req_t *req, return send_reply_ok(req, buf, size); } -struct fuse_ll_pipe -{ - size_t size; - int can_grow; - int pipe[2]; -}; - -static -void -fuse_ll_pipe_free(struct fuse_ll_pipe *llp) -{ - close(llp->pipe[0]); - close(llp->pipe[1]); - free(llp); -} - int fuse_reply_data(fuse_req_t *req, char *buf_, @@ -1748,7 +1724,6 @@ void fuse_ll_destroy(void *data) { struct fuse_ll *f = (struct fuse_ll *)data; - struct fuse_ll_pipe *llp; if(f->got_init && !f->got_destroy) { @@ -1756,24 +1731,12 @@ fuse_ll_destroy(void *data) f->op.destroy(f->userdata); } - llp = (fuse_ll_pipe*)pthread_getspecific(f->pipe_key); - if(llp != NULL) - fuse_ll_pipe_free(llp); - pthread_key_delete(f->pipe_key); mutex_destroy(&f->lock); free(f); lfmp_clear(&g_FMP_fuse_req); } -static -void -fuse_ll_pipe_destructor(void *data) -{ - struct fuse_ll_pipe *llp = (fuse_ll_pipe*)data; - fuse_ll_pipe_free(llp); -} - static void fuse_send_errno(struct fuse_ll *f_, @@ -1950,7 +1913,6 @@ fuse_lowlevel_new_common(struct fuse_args *args, size_t op_size, void *userdata) { - int err; struct fuse_ll *f; struct fuse_session *se; @@ -1971,16 +1933,8 @@ fuse_lowlevel_new_common(struct fuse_args *args, f->notify_ctr = 1; mutex_init(&f->lock); - err = pthread_key_create(&f->pipe_key, fuse_ll_pipe_destructor); - if(err) - { - fprintf(stderr, "fuse: failed to create thread specific key: %s\n", - strerror(err)); - goto out_free; - } - if(fuse_opt_parse(args,NULL,fuse_ll_opts,fuse_ll_opt_proc) == -1) - goto out_key_destroy; + goto out_free; memcpy(&f->op, op, op_size); f->owner = getuid(); @@ -1992,12 +1946,10 @@ fuse_lowlevel_new_common(struct fuse_args *args, (void*)fuse_ll_destroy); if(!se) - goto out_key_destroy; + goto out_free; return se; - out_key_destroy: - pthread_key_delete(f->pipe_key); out_free: mutex_destroy(&f->lock); free(f);