overlay: test multiple origin references to the same lower file

Multiple origin references to the same lower file from upper files
that are not hardlinks will falsely return the same st_ino/st_dev
for two different overlay files and will cause 'diff' to falsely
report that content of files is the same when it is not.

This test checks that overlayfs detects and fails lookup of a
multiply referenced origin.

The check for multiply referenced origin was a by-product of kernel
commit 31747eda41ef ("ovl: hash directory inodes for fsnotify")

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
3 files changed