From: Anna Schumaker Date: Fri, 8 Nov 2019 21:02:24 +0000 (-0500) Subject: NFS: Return -ETXTBSY when attempting to write to a swapfile X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=89658c4d04c7661c2c0770c6f92f465d58eed62d;p=linux.git 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 Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 95dc90570786c..8eb731d9be3ea 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);