Benjamin Coddington 60ae63ef19 NFSv42: Fix pagecache invalidation after COPY/CLONE
commit 3f015d89a47cd8855cd92f71fff770095bd885a1 upstream.

The mechanism in use to allow the client to see the results of COPY/CLONE
is to drop those pages from the pagecache.  This forces the client to read
those pages once more from the server.  However, truncate_pagecache_range()
zeros out partial pages instead of dropping them.  Let us instead use
invalidate_inode_pages2_range() with full-page offsets to ensure the client
properly sees the results of COPY/CLONE operations.

Cc: <stable@vger.kernel.org> # v4.7+
Fixes: 2e72448b07dc ("NFS: Add COPY nfs operation")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-08 09:03:17 +01:00
..
2021-11-18 14:04:22 +01:00
2021-11-18 14:04:23 +01:00
2020-05-27 10:10:12 -04:00
2020-08-15 08:26:55 -07:00
2021-09-08 08:49:01 +02:00
2021-11-18 14:04:23 +01:00
2021-11-18 14:04:23 +01:00
2020-06-11 13:33:48 -04:00
2021-11-18 14:04:23 +01:00