diff options
| author | Jeff Layton <jlayton@kernel.org> | 2026-04-28 10:09:51 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-05-15 20:24:33 +0300 |
| commit | 010043003c0c81c0cedde267076cbe1e0911db49 (patch) | |
| tree | 8fcf938f7319e27b31b8f6707e518350df4c305e /scripts | |
| parent | 12ffbb117b64d9f4b1b02521010a5f2953a1972a (diff) | |
| download | linux-010043003c0c81c0cedde267076cbe1e0911db49.tar.xz | |
fsnotify: add FSNOTIFY_EVENT_RENAME data type
Add a new fsnotify_rename_data struct and FSNOTIFY_EVENT_RENAME data
type that carries both the moved dentry and the inode that was
overwritten by the rename (if any).
Update fsnotify_data_inode(), fsnotify_data_dentry(), and
fsnotify_data_sb() to handle the new type, and add a new
fsnotify_data_rename_target() helper for extracting the overwritten
target inode.
Update fsnotify_move() to use the new data type for FS_RENAME and
FS_MOVED_TO events, passing the overwritten target inode through the
event data. FS_MOVED_FROM is unchanged since the source directory
doesn't need overwrite information.
This is done so that fsnotify consumers like nfsd can atomically
observe the overwritten file when a rename replaces an existing entry,
without needing a separate FS_DELETE event.
Assisted-by: Claude (Anthropic Claude Code)
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-7-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
