linux-stable/fs/overlayfs
Amir Goldstein 93ae5fdf21 ovl: fix value of i_ino for lower hardlink corner case
commit 300b124fcf upstream.

Commit 6dde1e42f4 ("ovl: make i_ino consistent with st_ino in more
cases"), relaxed the condition nfs_export=on in order to set the value of
i_ino to xino map of real ino.

Specifically, it also relaxed the pre-condition that index=on for
consistent i_ino. This opened the corner case of lower hardlink in
ovl_get_inode(), which calls ovl_fill_inode() with ino=0 and then
ovl_init_inode() is called to set i_ino to lower real ino without the xino
mapping.

Pass the correct values of ino;fsid in this case to ovl_fill_inode(), so it
can initialize i_ino correctly.

Fixes: 6dde1e42f4 ("ovl: make i_ino consistent with st_ino in more ...")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-21 09:03:05 +02:00
..
copy_up.c ovl: fix missing upper fs freeze protection on copy up for ioctl 2019-05-25 18:23:30 +02:00
dir.c ovl: relax WARN_ON() on rename to self 2019-12-17 20:34:51 +01:00
export.c ovl: Fix dereferencing possible ERR_PTR() 2019-10-05 13:10:08 +02:00
file.c ovl: fix lseek overflow on 32bit 2020-02-11 04:33:50 -08:00
inode.c ovl: fix value of i_ino for lower hardlink corner case 2020-04-21 09:03:05 +02:00
Kconfig ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
Makefile ovl: stack file ops 2018-07-18 15:44:41 +02:00
namei.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00
overlayfs.h ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00
ovl_entry.h ovl: fix regression caused by overlapping layers detection 2019-09-21 07:17:14 +02:00
readdir.c ovl: fix wrong WARN_ON() in ovl_cache_update_ino() 2020-02-11 04:34:02 -08:00
super.c ovl: fix regression caused by overlapping layers detection 2019-09-21 07:17:14 +02:00
util.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00