Module Name:    src
Committed By:   ad
Date:           Wed Apr  8 21:02:09 UTC 2009

Modified Files:
        src/sys/kern: sys_socket.c

Log Message:
soo_ioctl:

- cosmetic change after merge of socket locking patch.
- add a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/sys_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/sys_socket.c
diff -u src/sys/kern/sys_socket.c:1.60 src/sys/kern/sys_socket.c:1.61
--- src/sys/kern/sys_socket.c:1.60	Wed Apr  8 20:58:40 2009
+++ src/sys/kern/sys_socket.c	Wed Apr  8 21:02:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_socket.c,v 1.60 2009/04/08 20:58:40 ad Exp $	*/
+/*	$NetBSD: sys_socket.c,v 1.61 2009/04/08 21:02:09 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_socket.c,v 1.60 2009/04/08 20:58:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_socket.c,v 1.61 2009/04/08 21:02:09 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -126,13 +126,13 @@
 	struct socket *so = fp->f_data;
 	int error = 0;
 
-	if (cmd == FIONBIO) {
-		so->so_nbio = *(int *)data;
-		return 0;
-	}
-
 	switch (cmd) {
 
+	case FIONBIO:
+		/* No reason to lock and this call is made very often. */
+		so->so_nbio = *(int *)data;
+		break;
+
 	case FIOASYNC:
 		solock(so);
 		if (*(int *)data) {

Reply via email to