]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: fix lookup of indexed hardlinks with metacopy
authorAmir Goldstein <amir73il@gmail.com>
Wed, 15 Jul 2020 13:38:08 +0000 (16:38 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 16 Jul 2020 05:24:47 +0000 (07:24 +0200)
commit89c375a7e93849a792e1cdc9b99b14ade63c6ac4
treeba420bc68574a246e3893a92b75188c91baa28a1
parent25b8fc580ed5f3933e7fe10aea26856080b585a9
ovl: fix lookup of indexed hardlinks with metacopy

We recently moved setting inode flag OVL_UPPERDATA to ovl_lookup().

When looking up an overlay dentry, upperdentry may be found by index
and not by name.  In that case, we fail to read the metacopy xattr
and falsly set the OVL_UPPERDATA on the overlay inode.

This caused a regression in xfstest overlay/033 when run with
OVERLAY_MOUNT_OPTIONS="-o metacopy=on".

Fixes: 3ad851277d88 ("ovl: initialize OVL_UPPERDATA in ovl_lookup()")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/namei.c