Message ID | 20200511180245.215198-1-fabf@skynet.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fs/notify: cleanup | expand |
On Mon, May 11, 2020 at 9:02 PM Fabian Frederick <fabf@skynet.be> wrote: > > mark type is resolved from flags but is not itself bitwise. > That means user could send a combination and never note > only one value was taken in consideration. This patch clarifies > that fact in bit definitions. > > Thanks to Amir for explanations. > > Signed-off-by: Fabian Frederick <fabf@skynet.be> > --- > include/uapi/linux/fanotify.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h > index a88c7c6d0692..675bf6bbbe50 100644 > --- a/include/uapi/linux/fanotify.h > +++ b/include/uapi/linux/fanotify.h > @@ -71,7 +71,12 @@ > #define FAN_MARK_FLUSH 0x00000080 > /* FAN_MARK_FILESYSTEM is 0x00000100 */ > > -/* These are NOT bitwise flags. Both bits can be used togther. */ > +/* > + * These are NOT bitwise flags. Both bits can be used together. > + * IOW if someone does FAN_MARK_INODE | FAN_MARK_FILESYSTEM > + * it will be considered FAN_MARK_FILESYSTEM and user won't be > + * notified. Sorry, I don't find that those added lines add information. They are stating something obvious. Especially, in uapi file, I rather not say anything at all then say confusing things. Thanks, Amir. > + */ > #define FAN_MARK_INODE 0x00000000 > #define FAN_MARK_MOUNT 0x00000010 > #define FAN_MARK_FILESYSTEM 0x00000100 > -- > 2.26.2 >
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h index a88c7c6d0692..675bf6bbbe50 100644 --- a/include/uapi/linux/fanotify.h +++ b/include/uapi/linux/fanotify.h @@ -71,7 +71,12 @@ #define FAN_MARK_FLUSH 0x00000080 /* FAN_MARK_FILESYSTEM is 0x00000100 */ -/* These are NOT bitwise flags. Both bits can be used togther. */ +/* + * These are NOT bitwise flags. Both bits can be used together. + * IOW if someone does FAN_MARK_INODE | FAN_MARK_FILESYSTEM + * it will be considered FAN_MARK_FILESYSTEM and user won't be + * notified. + */ #define FAN_MARK_INODE 0x00000000 #define FAN_MARK_MOUNT 0x00000010 #define FAN_MARK_FILESYSTEM 0x00000100
mark type is resolved from flags but is not itself bitwise. That means user could send a combination and never note only one value was taken in consideration. This patch clarifies that fact in bit definitions. Thanks to Amir for explanations. Signed-off-by: Fabian Frederick <fabf@skynet.be> --- include/uapi/linux/fanotify.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)