summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2019-11-08 16:02:24 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-11-18 10:43:24 +0100
commit89658c4d04c7661c2c0770c6f92f465d58eed62d (patch)
tree50d00e184b7ea0bc1df71dbc86e3fe1ca28811eb /fs/nfs
parent0e96322b241cec8e8adf6cea70dc116d614f4add (diff)
downloadlinux-stable-89658c4d04c7661c2c0770c6f92f465d58eed62d.tar.gz
linux-stable-89658c4d04c7661c2c0770c6f92f465d58eed62d.tar.bz2
linux-stable-89658c4d04c7661c2c0770c6f92f465d58eed62d.zip
NFS: Return -ETXTBSY when attempting to write to a swapfile
My understanding is that -EBUSY refers to the underlying device, and that -ETXTBSY is used when attempting to access a file in use by the kernel (like a swapfile). Changing this return code helps us pass xfstests generic/569 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 95dc90570786..8eb731d9be3e 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -649,7 +649,7 @@ out:
out_swapfile:
printk(KERN_INFO "NFS: attempt to write to active swap file!\n");
- return -EBUSY;
+ return -ETXTBSY;
}
EXPORT_SYMBOL_GPL(nfs_file_write);