Commit ec1e88a0 authored by Trond Myklebust's avatar Trond Myklebust Committed by Zheng Zengkai
Browse files

NFSv4: Don't invalidate inode attributes on delegation return

stable inclusion
from stable-v5.10.115
commit 408fb2680e73ff6593e6e6eaca5667f78d11157d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IZ9C

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=408fb2680e73ff6593e6e6eaca5667f78d11157d



--------------------------------

commit 00c94ebe upstream.

There is no need to declare attributes such as the ctime, mtime and
block size invalid when we're just returning a delegation, so it is
inappropriate to call nfs_post_op_update_inode_force_wcc().
Instead, just call nfs_refresh_inode() after faking up the change
attribute. We know that the GETATTR op occurs before the DELEGRETURN, so
we are safe when doing this.

Fixes: 0bc2c9b4 ("NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURN")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 3a3c3a4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment