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)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 26 Apr 2022 00:55:03 +0000 (20:55 -0400)
commit00c94ebec5925593c0377b941289224469e72ac7
treee4874a8ec426dd6f7d00c4716b84f6cb20dd99f3
parente13433b4416fa31a24e621cbbbb39227a3d651dd
NFSv4: Don't invalidate inode attributes on delegation return

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>
fs/nfs/nfs4proc.c