diff options
| author | 2015-12-23 16:24:50 -0500 | |
|---|---|---|
| committer | 2016-02-03 14:20:14 -0800 | |
| commit | 2bab480d1ca9b654eff316eba44fad2eac8884b4 (patch) | |
| tree | 621af4480686cc2977c8a58a00b6572421d84c43 | |
| parent | staging: lustre: use proper braces in libcfs_kkuc_group_put (diff) | |
staging: lustre: return proper error code for libcfs_kkuc_msg_put
The functon libcfs_kkuc_msg_put() returns -ENOSYS which is not
correct. Return -ENXIO instead if the kuc header is corrupt.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c index 46cb81ab3c5f..281cfd6c2bc7 100644 --- a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c +++ b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c @@ -57,14 +57,14 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload) ssize_t count = kuch->kuc_msglen; loff_t offset = 0; mm_segment_t fs; - int rc = -ENOSYS; + int rc = -ENXIO; if (!filp || IS_ERR(filp)) return -EBADF; if (kuch->kuc_magic != KUC_MAGIC) { CERROR("KernelComm: bad magic %x\n", kuch->kuc_magic); - return -ENOSYS; + return rc; } fs = get_fs(); |
