From e4015aca9b7ba0c787ad8d07f7d9db18d3bbc211 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 3 Oct 2016 20:27:02 -0700 Subject: Merge master fuse_chan into fuse_session. This is a code simplification patch. - It confines most of the implementation channel implementation into fuse_loop_mt (which is its only user). - It makes it more obvious in the code that channels are only ever used when using -o clone_fd and multi-threaded main loop. - It simplies the definition of both struct fuse_session and struct fuse_chan. - Theoretically it should result in (minuscule) performance improvements when not using -o clone_fd. - Overall, it removes a lot more lines of source code than it adds :-). --- lib/fuse.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/fuse.c') diff --git a/lib/fuse.c b/lib/fuse.c index 2b164a0..8bc6b0a 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -4321,9 +4321,8 @@ static int fuse_session_loop_remember(struct fuse *f) int res = 0; struct timespec now; time_t next_clean; - struct fuse_chan *ch = fuse_session_chan(se); struct pollfd fds = { - .fd = ch->fd, + .fd = se->fd, .events = POLLIN }; struct fuse_buf fbuf = { @@ -4348,14 +4347,14 @@ static int fuse_session_loop_remember(struct fuse *f) else break; } else if (res > 0) { - res = fuse_session_receive_buf_int(se, &fbuf, ch); + res = fuse_session_receive_buf_int(se, &fbuf, NULL); if (res == -EINTR) continue; if (res <= 0) break; - fuse_session_process_buf_int(se, &fbuf, ch); + fuse_session_process_buf_int(se, &fbuf, NULL); } else { timeout = fuse_clean_cache(f); curr_time(&now); -- cgit v1.2.3