提交 89658c4d 编写于 作者: A Anna Schumaker 提交者: Trond Myklebust

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: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 0e96322b
......@@ -649,7 +649,7 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)
out_swapfile:
printk(KERN_INFO "NFS: attempt to write to active swap file!\n");
return -EBUSY;
return -ETXTBSY;
}
EXPORT_SYMBOL_GPL(nfs_file_write);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册