.IR pathname ,
add (OR) the events in
.I mask
-to the watch mask (instead of replacing the mask).
+to the watch mask (instead of replacing the mask);
+the error
+.B EINVAL
+results if
+.B IN_MASK_CREATE
+is also specified.
.TP
.B IN_ONESHOT
Monitor the filesystem object corresponding to
is not a directory.
Using this flag provides an application with a race-free way of
ensuring that the monitored object is a directory.
+.TP
+.BR IN_MASK_CREATE " (from Linux 4.18)"
+Watch
+.I pathname
+only if it does not already have a watch associated with it;
+the error
+.B EEXIST
+results if
+.I pathname
+already is being watched.
+Using this flag provides an application with a way of ensuring
+that new watches do not modify existing ones. This is useful
+because multiple paths may refer to the same inode, and
+multiple calls to
+.B inotify_add_watch (2)
+without this flag may clobber existing watch masks.
.RE
.PP
The following bits may be set in the