spl5 not splimp
[unix-history] / usr / src / sys / kern / vfs_syscalls.c
index 0c4e494..c8ad364 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_syscalls.c  4.14    81/11/16        */
+/*     vfs_syscalls.c  4.17    82/01/19        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -126,7 +126,9 @@ dup()
        }
        if (i != uap->fdes) {
                if (u.u_ofile[i]!=NULL)
        }
        if (i != uap->fdes) {
                if (u.u_ofile[i]!=NULL)
-                       closef(u.u_ofile[i]);
+                       closef(u.u_ofile[i], 0);
+               if (u.u_error)
+                       return;
                u.u_ofile[i] = fp;
                fp->f_count++;
        }
                u.u_ofile[i] = fp;
                fp->f_count++;
        }
@@ -224,7 +226,7 @@ sumount()
        if (u.u_error)
                return;
        xumount(dev);   /* remove unused sticky files from text table */
        if (u.u_error)
                return;
        xumount(dev);   /* remove unused sticky files from text table */
-       update();
+       update(0);
        for (mp = &mount[0]; mp < &mount[NMOUNT]; mp++)
                if (mp->m_bufp != NULL && dev == mp->m_dev)
                        goto found;
        for (mp = &mount[0]; mp < &mount[NMOUNT]; mp++)
                if (mp->m_bufp != NULL && dev == mp->m_dev)
                        goto found;