On Wed, Jan 15, 2020 at 02:03:35AM +0200, Amir Goldstein wrote: > Only problem I forgot about is that I need to propagate name_snapshot > into fsnotify_move() instead of qstr (in order to snapshot it). > That means I will need to snapshot also new_dentry in vfs_rename(), so > I have a name_snapshot to pass into the RENAME_EXCHANGE > fsnotify_move() hook. > > My current patch passes the cute &old_dentry->d_name_snap abstract > to fsnotify_move(). > > What shall I do about that? > > take_dentry_name_snapshot(&new_name, new_dentry); > ??? Wait a sec... How long is that thing going to be using the snapshot? And I bloody well hope that this is _not_ going to be unconditional - having each rename() pay for *notify is a bad idea, for obvious reasons. Details, please...