summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-05-31 14:06:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-21 07:18:04 +0200
commitbadbf863ed911900c2db0de1634b850c3073d164 (patch)
tree404c6a621d3bb3296b1f71fdaa1fb632c1726f9f /fs/nfs
parent543792290cce90676a1b272694715a250288b55d (diff)
downloadlinux-stable-badbf863ed911900c2db0de1634b850c3073d164.tar.gz
linux-stable-badbf863ed911900c2db0de1634b850c3073d164.tar.bz2
linux-stable-badbf863ed911900c2db0de1634b850c3073d164.zip
nfs: disable client side deduplication
commit 9026b3a973b0b0b73c15ba40aff87cd0959fd0f3 upstream. The NFS protocol doesn't support deduplication, so turn it off again. Fixes: ce96e888fe48e ("Fix nfs4.2 return -EINVAL when do dedupe operation") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 3a507c42c1ca..52dbd17e401e 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -187,7 +187,11 @@ static loff_t nfs42_remap_file_range(struct file *src_file, loff_t src_off,
bool same_inode = false;
int ret;
- if (remap_flags & ~(REMAP_FILE_DEDUP | REMAP_FILE_ADVISORY))
+ /* NFS does not support deduplication. */
+ if (remap_flags & REMAP_FILE_DEDUP)
+ return -EOPNOTSUPP;
+
+ if (remap_flags & ~REMAP_FILE_ADVISORY)
return -EINVAL;
/* check alignment w.r.t. clone_blksize */