Commit 2bab480d authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

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: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0d5e63e
...@@ -57,14 +57,14 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload) ...@@ -57,14 +57,14 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload)
ssize_t count = kuch->kuc_msglen; ssize_t count = kuch->kuc_msglen;
loff_t offset = 0; loff_t offset = 0;
mm_segment_t fs; mm_segment_t fs;
int rc = -ENOSYS; int rc = -ENXIO;
if (!filp || IS_ERR(filp)) if (!filp || IS_ERR(filp))
return -EBADF; return -EBADF;
if (kuch->kuc_magic != KUC_MAGIC) { if (kuch->kuc_magic != KUC_MAGIC) {
CERROR("KernelComm: bad magic %x\n", kuch->kuc_magic); CERROR("KernelComm: bad magic %x\n", kuch->kuc_magic);
return -ENOSYS; return rc;
} }
fs = get_fs(); fs = get_fs();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment