]> git.ipfire.org Git - thirdparty/systemd.git/commit
mmap-cache: merge mmap_cache_fd_get() with try_context() and find_mmap()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 29 Sep 2023 21:51:48 +0000 (06:51 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 4 Oct 2023 10:53:27 +0000 (19:53 +0900)
commit40f5e6a941c37efe79cf29b6f9d4d938452040cc
tree94019aa50c714949e89fcbd483b430d23e86991c
parent81598f5ead972fac3f78dc1c8190b059bd5fceeb
mmap-cache: merge mmap_cache_fd_get() with try_context() and find_mmap()

The post operations (attach the found or new window to a context, update
the keep_always flag, and calculate the address) in three steps are
equivalent, and the two searching logics are quite simple.
Let's merge them to decrease the total lines.

No functional change, just refactoring.
src/libsystemd/sd-journal/mmap-cache.c