NFSv4: Don't invalidate inode attributes on delegation return
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 25 Apr 2022 22:04:27 +0000 (18:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:25:39 +0000 (12:25 +0200)
commit408fb2680e73ff6593e6e6eaca5667f78d11157d
tree8b2893f9bc587b1a373afc19e888bccb1cd28121
parentc1b480e6bed838f8384c8810c24b457ca3696e06
NFSv4: Don't invalidate inode attributes on delegation return

commit 00c94ebec5925593c0377b941289224469e72ac7 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: 0bc2c9b4dca9 ("NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURN")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c