Author: pjd
Date: Wed Jun 13 21:38:07 2012
New Revision: 237034
URL: http://svn.freebsd.org/changeset/base/237034

Log:
  Now that dupfdopen() doesn't depend on finstall() being called earlier,
  indx will never be -1 on error, as none of dupfdopen(), finstall() and
  kern_capwrap() modifies it on error, but what is more important none of
  those functions install and leave file at indx descriptor on error.
  
  Leave an assert to prove my words.
  
  MFC after:    1 month

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c        Wed Jun 13 21:32:35 2012        
(r237033)
+++ head/sys/kern/vfs_syscalls.c        Wed Jun 13 21:38:07 2012        
(r237034)
@@ -1237,8 +1237,7 @@ success:
 bad:
        VFS_UNLOCK_GIANT(vfslocked);
 bad_unlocked:
-       if (indx != -1)
-               fdclose(fdp, fp, indx, td);
+       KASSERT(indx == -1, ("indx=%d, should be -1", indx));
        fdrop(fp, td);
        return (error);
 }
_______________________________________________
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"

Reply via email to