]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: wire up FAN_RENAME event
authorAmir Goldstein <amir73il@gmail.com>
Mon, 29 Nov 2021 20:15:37 +0000 (22:15 +0200)
committerJan Kara <jack@suse.cz>
Wed, 15 Dec 2021 14:58:40 +0000 (15:58 +0100)
commitb60e3c1ce474ec466dd304026378858af43eb002
treea4a2a7fdfbcb8f70f36f5e1e3b7f6c890b457172
parente80543899d8d85b528f83ce0fa231f5fad0f2ec3
fanotify: wire up FAN_RENAME event

FAN_RENAME is the successor of FAN_MOVED_FROM and FAN_MOVED_TO
and can be used to get the old and new parent+name information in
a single event.

FAN_MOVED_FROM and FAN_MOVED_TO are still supported for backward
compatibility, but it makes little sense to use them together with
FAN_RENAME in the same group.

FAN_RENAME uses special info type records to report the old and
new parent+name, so reporting only old and new parent id is less
useful and was not implemented.
Therefore, FAN_REANAME requires a group with flag FAN_REPORT_NAME.

Link: https://lore.kernel.org/r/20211129201537.1932819-12-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify_user.c
include/linux/fanotify.h