]> www.infradead.org Git - users/dwmw2/linux.git/commit
ovl: fix wrong WARN_ON() in ovl_cache_update_ino()
authorAmir Goldstein <amir73il@gmail.com>
Sun, 22 Dec 2019 20:47:54 +0000 (22:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:36:55 +0000 (04:36 -0800)
commitb89204e423a58fc73f76c4967b5d52a40bb063ea
tree47b9f15a2e8ec2b0091148614ee4884a5bd26212
parent73c72fde075010e9d36987f881257ffc33bb050e
ovl: fix wrong WARN_ON() in ovl_cache_update_ino()

commit 4c37e71b713ecffe81f8e6273c6835e54306d412 upstream.

The WARN_ON() that child entry is always on overlay st_dev became wrong
when we allowed this function to update d_ino in non-samefs setup with xino
enabled.

It is not true in case of xino bits overflow on a non-dir inode.  Leave the
WARN_ON() only for directories, where assertion is still true.

Fixes: adbf4f7ea834 ("ovl: consistent d_ino for non-samefs with xino")
Cc: <stable@vger.kernel.org> # v4.17+
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>
fs/overlayfs/readdir.c