mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
NFSv4.2: error out when relink swapfile
[ Upstream commit f5fdf1243fb750598b46305dd03c553949cfa14f ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
264e3f1597
commit
59bafdc994
1 changed files with 3 additions and 0 deletions
|
|
@ -210,6 +210,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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue