diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-03 20:27:02 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-03 23:01:46 -0700 |
commit | e4015aca9b7ba0c787ad8d07f7d9db18d3bbc211 (patch) | |
tree | 579aa5f63874d979ec7b233214dbb0ee8debf260 /lib/fuse.c | |
parent | e572cfbd3490add057b867c29d37da51ee8217e5 (diff) | |
download | libfuse-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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); |