Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1265176

[PATCH 12/13] staging: lustre: return proper error code for libcfs_kkuc_msg_put

From James Simmons <jsimmons@infradead.org>
Newsgroups linux.kernel
Subject [PATCH 12/13] staging: lustre: return proper error code for libcfs_kkuc_msg_put
Date 2015-11-08 20:20 +0100
Message-ID <qsDFp-4dG-31@gated-at.bofh.it> (permalink)
References <qsDFo-4dG-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 .../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 46cb81a..281cfd6 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();
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] bring lustre's kernel_comm code up to date James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 09/13] staging: lustre: cleanup block comment style in kernel_comm code James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 01/13] staging: lustre: remove hsm_nl proc file James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 11/13] staging: lustre: use proper braces in libcfs_kkuc_group_put James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 07/13] staging: lustre: convert kernelcomm group to unsigned int James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 05/13] staging: lustre: split kernel comm between user and kernel James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 12/13] staging: lustre: return proper error code for libcfs_kkuc_msg_put James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 04/13] staging: lustre: move kernel_user_comm.c from libcfs to lustre James Simmons <jsimmons@infradead.org> - 2015-11-08 20:20 +0100
  [PATCH 02/13] staging: lustre: kg_sem semaphore handling is incorrectly James Simmons <jsimmons@infradead.org> - 2015-11-08 20:30 +0100
  [PATCH 03/13] staging: lustre: Prevent duplicate CT registrations James Simmons <jsimmons@infradead.org> - 2015-11-08 20:30 +0100

csiph-web