aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2016-10-03 20:27:02 -0700
committerNikolaus Rath <Nikolaus@rath.org>2016-10-03 23:01:46 -0700
commite4015aca9b7ba0c787ad8d07f7d9db18d3bbc211 (patch)
tree579aa5f63874d979ec7b233214dbb0ee8debf260 /lib/fuse.c
parente572cfbd3490add057b867c29d37da51ee8217e5 (diff)
downloadlibfuse-e4015aca9b7ba0c787ad8d07f7d9db18d3bbc211.tar.gz
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 :-).
Diffstat (limited to 'lib/fuse.c')
-rw-r--r--lib/fuse.c7
1 files changed, 3 insertions, 4 deletions
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);