Re: [PATCH 05/20] kernfs: do not call fsnotify() with name without a parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 12, 2020 at 12:33:28PM +0300, Amir Goldstein wrote:
> When creating an FS_MODIFY event on inode itself (not on parent)
> the file_name argument should be NULL.
> 
> The change to send a non NULL name to inode itself was done on purpuse
> as part of another commit, as Tejun writes: "...While at it, supply the
> target file name to fsnotify() from kernfs_node->name.".
> 
> But this is wrong practice and inconsistent with inotify behavior when
> watching a single file.  When a child is being watched (as opposed to the
> parent directory) the inotify event should contain the watch descriptor,
> but not the file name.
> 
> Fixes: df6a58c5c5aa ("kernfs: don't depend on d_find_any_alias()...")
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

-- 
tejun



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux