]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: (monitor) optimize inotify utab watch
authorKarel Zak <kzak@redhat.com>
Tue, 10 Jun 2025 11:51:23 +0000 (13:51 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Aug 2025 12:58:32 +0000 (14:58 +0200)
commita84f6b92b530275ada50d18357ddb2b6ff4618c1
tree4c0af751e9006e3f86df23763a835bf62a6c4839
parent89c310c9f4ce1f1d37eca489c0fb467cacbb01ff
libmount: (monitor) optimize inotify utab watch

Don't repeat no-op inotify_add_watch() calls. This happens when we
monitor the /run[/mount] directory before the utab.event file exists.
The old version just tries to create a watch and ignores ENOENT
errors. It seems better to remember the path of the last created watch
and not repeat it.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/monitor_utab.c