linux/fs/notify/fanotify
Linus Torvalds d0e71e23ec Revert "fanotify: remove unneeded sub-zero check for unsigned value"
This reverts commit e659522446.

These kinds of patches are only making the code worse.

Compilers don't care about the unnecessary check, but removing it makes
the code less obvious to a human.  The declaration of 'len' is more than
80 lines earlier, so a human won't easily see that 'len' is of an
unsigned type, so to a human the range check that checks against zero is
much more explicit and obvious.

Any tool that complains about a range check like this just because the
variable is unsigned is actively detrimental, and should be ignored.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-05-20 12:43:58 -07:00
..
fanotify_user.c Revert "fanotify: remove unneeded sub-zero check for unsigned value" 2024-05-20 12:43:58 -07:00
fanotify.c fanotify: allow freeze when waiting response for permission events 2024-03-07 12:59:51 +01:00
fanotify.h fanotify: allow "weak" fsid when watching a single filesystem 2023-12-01 10:55:21 +01:00
Kconfig
Makefile