Inotify fix a data race in init function