projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb095c1
)
NFSv4.2: error out when relink swapfile
author
Murphy Zhou
<jencce.kernel@gmail.com>
Fri, 14 Feb 2020 14:34:09 +0000
(22:34 +0800)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Mon, 16 Mar 2020 14:14:30 +0000
(10:14 -0400)
This fixes xfstests generic/356 failure on NFSv4.2.
Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4file.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4file.c
b/fs/nfs/nfs4file.c
index
1297919
..
8e5d622
100644
(file)
--- a/
fs/nfs/nfs4file.c
+++ b/
fs/nfs/nfs4file.c
@@
-252,6
+252,9
@@
static loff_t nfs42_remap_file_range(struct file *src_file, loff_t src_off,
if (remap_flags & ~REMAP_FILE_ADVISORY)
return -EINVAL;
+ if (IS_SWAPFILE(dst_inode) || IS_SWAPFILE(src_inode))
+ return -ETXTBSY;
+
/* check alignment w.r.t. clone_blksize */
ret = -EINVAL;
if (bs) {