Date: Thu, 20 Jul 2006 20:26:26 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102025 for review Message-ID: <200607202026.k6KKQQfA044366@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102025 Change 102025 by jhb@jhb_mutex on 2006/07/20 20:25:37 Document what fdclose() does as it wasn't obvious to me when I looked at it back when doing kern_accept() last week. Affected files ... .. //depot/projects/smpng/sys/kern/kern_descrip.c#95 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_descrip.c#95 (text+ko) ==== @@ -1756,6 +1756,14 @@ FILEDESC_UNLOCK(fdp); } +/* + * If a specific file object occupies a specific file descriptor, + * close the file descriptor entry and drop a reference on the file + * object. This is a convenience function to handle a subsequent + * error in a function that calls falloc() that handles the race that + * another thread might have closed the file descriptor out from under + * the thread creating the file object. + */ void fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607202026.k6KKQQfA044366>