ovl: do not generate duplicate fsnotify events for "fake" path
authorAmir Goldstein <amir73il@gmail.com>
Wed, 24 Apr 2019 16:39:50 +0000 (19:39 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 6 May 2019 11:54:51 +0000 (13:54 +0200)
commitd989903058a83e8536cc7aadf9256a47d5c173fe
tree0d5a18db81f262da961d3d27b4976bc64e78dc62
parent9e46b840c7053b5f7a245e98cd239b60d189a96c
ovl: do not generate duplicate fsnotify events for "fake" path

Overlayfs "fake" path is used for stacked file operations on underlying
files.  Operations on files with "fake" path must not generate fsnotify
events with path data, because those events have already been generated at
overlayfs layer and because the reported event->fd for fanotify marks on
underlying inode/filesystem will have the wrong path (the overlayfs path).

Link: https://lore.kernel.org/linux-fsdevel/20190423065024.12695-1-jencce.kernel@gmail.com/
Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
Fixes: d1d04ef8572b ("ovl: stack file ops")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/file.c