Author: pjd Date: Thu Jun 14 15:35:14 2012 New Revision: 237076 URL: http://svn.freebsd.org/changeset/base/237076
Log: - Assert that the filedesc lock is being held when fdisused() is called. - Fix white spaces. MFC after: 1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Jun 14 15:34:10 2012 (r237075) +++ head/sys/kern/kern_descrip.c Thu Jun 14 15:35:14 2012 (r237076) @@ -243,8 +243,10 @@ static int fdisused(struct filedesc *fdp, int fd) { - KASSERT(fd >= 0 && fd < fdp->fd_nfiles, - ("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles)); + FILEDESC_LOCK_ASSERT(fdp); + + KASSERT(fd >= 0 && fd < fdp->fd_nfiles, + ("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles)); return ((fdp->fd_map[NDSLOT(fd)] & NDBIT(fd)) != 0); } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"