From: Martin Wilck <mwilck@xxxxxxxx> Minor edit: if notifications are off, we set the poll fd to -1 but still use the POLLIN mask. It looks nicer if to poll the correct fd, but reset the event mask to 0 if we're not actually interested in it. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- multipathd/uxlsnr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c index 6506109..98a9f71 100644 --- a/multipathd/uxlsnr.c +++ b/multipathd/uxlsnr.c @@ -357,11 +357,11 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, long ux_sock, } reset_watch(notify_fd, &wds, &sequence_nr); + polls[POLLFD_NOTIFY].fd = notify_fd; if (notify_fd == -1 || (wds.conf_wd == -1 && wds.dir_wd == -1)) - polls[POLLFD_NOTIFY].fd = -1; + polls[POLLFD_NOTIFY].events = 0; else - polls[POLLFD_NOTIFY].fd = notify_fd; - polls[POLLFD_NOTIFY].events = POLLIN; + polls[POLLFD_NOTIFY].events = POLLIN; /* setup the clients */ i = POLLFDS_BASE; -- 2.33.0 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel