svn commit: r198065 - user/kmacy/releng_8_fcs/sys/kern

Kip Macy kmacy at FreeBSD.org
Wed Oct 14 01:25:28 UTC 2009


Author: kmacy
Date: Wed Oct 14 01:25:28 2009
New Revision: 198065
URL: http://svn.freebsd.org/changeset/base/198065

Log:
  delay teardown if user is in the middle of changing fps statet

Modified:
  user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c

Modified: user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c	Tue Oct 13 23:44:32 2009	(r198064)
+++ user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c	Wed Oct 14 01:25:28 2009	(r198065)
@@ -3396,6 +3396,11 @@ socketref_free(struct socketref *sr)
 	struct sockbuf *sb = &sr->sr_so->so_snd;
 	int refs;
 
+	if (sock_fp->f_count != fp->f_count) {
+		sb->sb_flags |= (SB_SENDING|SB_SENDING_TASK);
+		taskqueue_enqueue(sendfile_tq, &sr->sr_task);
+		return (1);
+	}
 	if (cred != NULL)
 		crfree(cred);
 	vrele(fp->f_vnode);


More information about the svn-src-user mailing list