ok:

at about line 498 in vfs_aio.c:

                aiocbn = TAILQ_NEXT(aiocbe, plist);
                fp = fdp->fd_ofiles[aiocbe->uaiocb.aio_fildes];

                /*
                 * Under some circumstances, the aio_fildes and the file
                 * structure don't match.  This would leave aiocbe's in the
                 * TAILQ associated with the socket and cause a panic later.
                 * 
                 * Detect and fix.
                 */
                if ((fp == NULL) || (fp != aiocbe->fd_file))
                        fp = aiocbe->fd_file;

So, basically if fp is NULL or not fp != aiocbe->fd_file then it's
set to aiocbe->fd_file, doesn't that mean it should just be:

                fp = aiocbe->fd_file;

Index: vfs_aio.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/vfs_aio.c,v
retrieving revision 1.107
diff -u -r1.107 vfs_aio.c
--- vfs_aio.c   2 Jan 2002 07:04:38 -0000       1.107
+++ vfs_aio.c   5 Jan 2002 21:21:00 -0000
@@ -496,17 +496,7 @@
        for (aiocbe = TAILQ_FIRST(&ki->kaio_sockqueue); aiocbe; aiocbe =
            aiocbn) {
                aiocbn = TAILQ_NEXT(aiocbe, plist);
-               fp = fdp->fd_ofiles[aiocbe->uaiocb.aio_fildes];
-               
-               /*
-                * Under some circumstances, the aio_fildes and the file
-                * structure don't match.  This would leave aiocbe's in the
-                * TAILQ associated with the socket and cause a panic later.
-                * 
-                * Detect and fix.
-                */
-               if ((fp == NULL) || (fp != aiocbe->fd_file))
-                       fp = aiocbe->fd_file;
+               fp = aiocbe->fd_file;
                if (fp) {
                        so = (struct socket *)fp->f_data;
                        TAILQ_REMOVE(&so->so_aiojobq, aiocbe, list);


-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to