CIFS: Force revalidate inode when dentry is stale
authorPavel Shilovsky <piastryyy@gmail.com>
Mon, 30 Sep 2019 17:06:19 +0000 (10:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2019 20:42:43 +0000 (13:42 -0700)
commit2ce48f039c6be94c3928b2351768490ca428248d
tree4be5bcda0eee103a27f860df422957bfb071ee80
parent3a539d980446d4f30e758eec4b525e37a6dbcef8
CIFS: Force revalidate inode when dentry is stale

commit c82e5ac7fe3570a269c0929bf7899f62048e7dbc upstream.

Currently the client indicates that a dentry is stale when inode
numbers or type types between a local inode and a remote file
don't match. If this is the case attributes is not being copied
from remote to local, so, it is already known that the local copy
has stale metadata. That's why the inode needs to be marked for
revalidation in order to tell the VFS to lookup the dentry again
before openning a file. This prevents unexpected stale errors
to be returned to the user space when openning a file.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/inode.c