On Mon, Oct 14, 2019 at 06:17:29PM +0200, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
The patch below does not apply to the 4.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From c82e5ac7fe3570a269c0929bf7899f62048e7dbc Mon Sep 17 00:00:00 2001 From: Pavel Shilovsky <piastryyy@xxxxxxxxx> Date: Mon, 30 Sep 2019 10:06:19 -0700 Subject: [PATCH] CIFS: Force revalidate inode when dentry is stale 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@xxxxxxxxxxxxxxx> Signed-off-by: Pavel Shilovsky <pshilov@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
I also took a108471b5730b ("cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary") and queued both for 4.4. -- Thanks, Sasha