]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: fix false positive ESTALE on lookup
authorAmir Goldstein <amir73il@gmail.com>
Mon, 11 Sep 2017 13:30:15 +0000 (16:30 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 12 Sep 2017 15:22:20 +0000 (17:22 +0200)
commit91c2b909990a3335060f05c98f9357d5716e57a8
tree3fae925cafeed10a9f2e1b8c8b717601df4dbad0
parentac98c5276d5100095740ce5d2492a17546adeaf0
ovl: fix false positive ESTALE on lookup

Commit 3cfb0a1ea255 ("ovl: hash overlay non-dir inodes by copy up origin")
verifies that the origin lower inode stored in the overlayfs inode matched
the inode of a copy up origin dentry found by lookup.

There is a false positive result in that check when lower fs does not
support file handles and copy up origin cannot be followed by file handle
at lookup time.

The false negative happens when finding an overlay inode in cache on a
copied up overlay dentry lookup. The overlay inode still 'remembers' the
copy up origin inode, but the copy up origin dentry is not available for
verification.

Relax the check in case copy up origin dentry is not available.

Fixes: 3cfb0a1ea255 ("ovl: hash overlay non-dir inodes by copy up...")
Cc: <stable@vger.kernel.org> # v4.13
Reported-by: Jordi Pujol <jordipujolp@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/inode.c