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:30:15 +0000 (12:30 +0200)
commitd34f9bbc1d195f096d3be8a2c42d95c56188c017
tree5ec8996dc7b6b82aa3aa61f8f279a64c6de8869b
parenta61a5582371185461207d650a87bdcc374f23be4
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