]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 20 Sep 2017 12:24:57 +0000 (07:24 -0500)
commit96a96e1a21bff170ca2c5640d3ee36547872bfd2
tree16c9778ffa469c68e1ccfd6ba5573eda44bcff37
parenta6456406907aa8ab001d753cd6477cdc2a738768
ovl: fix false positive ESTALE on lookup

BugLink: http://bugs.launchpad.net/bugs/1718412
commit 939ae4efd51c627da270af74ef069db5124cb5b0 upstream.

Commit b9ac5c274b8c ("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: b9ac5c274b8c ("ovl: hash overlay non-dir inodes by copy up...")
Reported-by: Jordi Pujol <jordipujolp@gmail.com>
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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/overlayfs/inode.c