Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 8/9 linux-next] fanotify: clarify mark type extraction
@ 2020-05-11 18:02 Fabian Frederick
2020-05-11 21:54 ` Amir Goldstein
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2020-05-11 18:02 UTC (permalink / raw)
To: jack, amir73il; +Cc: linux-fsdevel, Fabian Frederick
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.
+ */
#define FAN_MARK_INODE 0x00000000
#define FAN_MARK_MOUNT 0x00000010
#define FAN_MARK_FILESYSTEM 0x00000100
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 8/9 linux-next] fanotify: clarify mark type extraction
2020-05-11 18:02 [PATCH 8/9 linux-next] fanotify: clarify mark type extraction Fabian Frederick
@ 2020-05-11 21:54 ` Amir Goldstein
0 siblings, 0 replies; 2+ messages in thread
From: Amir Goldstein @ 2020-05-11 21:54 UTC (permalink / raw)
To: Fabian Frederick; +Cc: Jan Kara, linux-fsdevel
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-11 21:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 18:02 [PATCH 8/9 linux-next] fanotify: clarify mark type extraction Fabian Frederick
2020-05-11 21:54 ` Amir Goldstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).