pass V_SAVE to vinvalbuf
[unix-history] / usr / src / sys / ufs / lfs / lfs_vfsops.c
index 378c6d9..34aac29 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)lfs_vfsops.c        8.2 (Berkeley) %G%
+ *     @(#)lfs_vfsops.c        8.6 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -81,8 +81,9 @@ lfs_mount(mp, path, data, ndp, p)
                return (error);
 
        /* Until LFS can do NFS right.          XXX */
                return (error);
 
        /* Until LFS can do NFS right.          XXX */
-       if (args.exflags & MNT_EXPORTED)
+       if (args.export.ex_flags & MNT_EXPORTED)
                return (EINVAL);
                return (EINVAL);
+
        /*
         * If updating, check whether changing from read-only to
         * read/write; if there is no device name, that's all we do.
        /*
         * If updating, check whether changing from read-only to
         * read/write; if there is no device name, that's all we do.
@@ -102,17 +103,7 @@ lfs_mount(mp, path, data, ndp, p)
                        /*
                         * Process export requests.
                         */
                        /*
                         * Process export requests.
                         */
-                       if (args.exflags & MNT_EXPORTED) {
-                               if (error = ufs_hang_addrlist(mp, &args))
-                                       return (error);
-                               mp->mnt_flag |= MNT_EXPORTED;
-                       }
-                       if (args.exflags & MNT_DELEXPORT) {
-                               ufs_free_addrlist(ump);
-                               mp->mnt_flag &=
-                                   ~(MNT_EXPORTED | MNT_DEFEXPORTED);
-                       }
-                       return (0);
+                       return (vfs_export(mp, &ump->um_export, &args.export));
                }
        }
        /*
                }
        }
        /*
@@ -292,7 +283,7 @@ lfs_unmount(mp, mntflags, p)
 
        flags = 0;
        if (mntflags & MNT_FORCE) {
 
        flags = 0;
        if (mntflags & MNT_FORCE) {
-               if (!doforce || mp == rootfs)
+               if (!doforce || (mp->mnt_flag & MNT_ROOTFS))
                        return (EINVAL);
                flags |= FORCECLOSE;
        }
                        return (EINVAL);
                flags |= FORCECLOSE;
        }
@@ -320,7 +311,7 @@ lfs_unmount(mp, mntflags, p)
        fs->lfs_clean = 1;
        if (error = VFS_SYNC(mp, 1, p->p_ucred, p))
                return (error);
        fs->lfs_clean = 1;
        if (error = VFS_SYNC(mp, 1, p->p_ucred, p))
                return (error);
-       if (fs->lfs_ivnode->v_dirtyblkhd.le_next)
+       if (fs->lfs_ivnode->v_dirtyblkhd.lh_first)
                panic("lfs_unmount: still dirty blocks on ifile vnode\n");
        vrele(fs->lfs_ivnode);
        vgone(fs->lfs_ivnode);
                panic("lfs_unmount: still dirty blocks on ifile vnode\n");
        vrele(fs->lfs_ivnode);
        vgone(fs->lfs_ivnode);
@@ -372,7 +363,6 @@ lfs_sync(mp, waitfor, cred, p)
        struct ucred *cred;
        struct proc *p;
 {
        struct ucred *cred;
        struct proc *p;
 {
-       extern int syncprt;
        int error;
 
        /* All syncs must be checkpoints until roll-forward is implemented. */
        int error;
 
        /* All syncs must be checkpoints until roll-forward is implemented. */