Author: kib
Date: Thu Jan 29 11:38:28 2009
New Revision: 187892
URL: http://svn.freebsd.org/changeset/base/187892

Log:
  MFC r183071:
  Garbage-collect vn_write_suspend_wait().

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/gnu/fs/ext2fs/ext2_inode.c
  stable/7/sys/kern/vfs_vnops.c
  stable/7/sys/sys/vnode.h

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_inode.c
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_inode.c     Thu Jan 29 11:21:15 2009        
(r187891)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_inode.c     Thu Jan 29 11:38:28 2009        
(r187892)
@@ -481,7 +481,6 @@ ext2_inactive(ap)
        if (ip->i_mode == 0)
                goto out;
        if (ip->i_nlink <= 0) {
-               (void) vn_write_suspend_wait(vp, NULL, V_WAIT);
                error = ext2_truncate(vp, (off_t)0, 0, NOCRED, td);
                ip->i_rdev = 0;
                mode = ip->i_mode;
@@ -489,15 +488,8 @@ ext2_inactive(ap)
                ip->i_flag |= IN_CHANGE | IN_UPDATE;
                ext2_vfree(vp, ip->i_number, mode);
        }
-       if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) {
-               if ((ip->i_flag & (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) == 0 &&
-                   vn_write_suspend_wait(vp, NULL, V_NOWAIT)) {
-                       ip->i_flag &= ~IN_ACCESS;
-               } else {
-                       (void) vn_write_suspend_wait(vp, NULL, V_WAIT);
-                       ext2_update(vp, 0);
-               }
-       }
+       if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE))
+               ext2_update(vp, 0);
 out:
        /*
         * If we are done with the inode, reclaim it

Modified: stable/7/sys/kern/vfs_vnops.c
==============================================================================
--- stable/7/sys/kern/vfs_vnops.c       Thu Jan 29 11:21:15 2009        
(r187891)
+++ stable/7/sys/kern/vfs_vnops.c       Thu Jan 29 11:38:28 2009        
(r187892)
@@ -943,56 +943,6 @@ unlock:
  * time, these operations are halted until the suspension is over.
  */
 int
-vn_write_suspend_wait(vp, mp, flags)
-       struct vnode *vp;
-       struct mount *mp;
-       int flags;
-{
-       int error;
-
-       if (vp != NULL) {
-               if ((error = VOP_GETWRITEMOUNT(vp, &mp)) != 0) {
-                       if (error != EOPNOTSUPP)
-                               return (error);
-                       return (0);
-               }
-       }
-       /*
-        * If we are not suspended or have not yet reached suspended
-        * mode, then let the operation proceed.
-        */
-       if (mp == NULL)
-               return (0);
-       MNT_ILOCK(mp);
-       if (vp == NULL)
-               MNT_REF(mp);
-       if ((mp->mnt_kern_flag & MNTK_SUSPENDED) == 0) {
-               MNT_REL(mp);
-               MNT_IUNLOCK(mp);
-               return (0);
-       }
-       if (flags & V_NOWAIT) {
-               MNT_REL(mp);
-               MNT_IUNLOCK(mp);
-               return (EWOULDBLOCK);
-       }
-       /*
-        * Wait for the suspension to finish.
-        */
-       error = msleep(&mp->mnt_flag, MNT_MTX(mp),
-           (PUSER - 1) | (flags & PCATCH) | PDROP, "suspfs", 0);
-       vfs_rel(mp);
-       return (error);
-}
-
-/*
- * Secondary suspension. Used by operations such as vop_inactive
- * routines that are needed by the higher level functions. These
- * are allowed to proceed until all the higher level functions have
- * completed (indicated by mnt_writeopcount dropping to zero). At that
- * time, these operations are halted until the suspension is over.
- */
-int
 vn_start_secondary_write(vp, mpp, flags)
        struct vnode *vp;
        struct mount **mpp;

Modified: stable/7/sys/sys/vnode.h
==============================================================================
--- stable/7/sys/sys/vnode.h    Thu Jan 29 11:21:15 2009        (r187891)
+++ stable/7/sys/sys/vnode.h    Thu Jan 29 11:38:28 2009        (r187892)
@@ -625,8 +625,6 @@ int vn_stat(struct vnode *vp, struct sta
 int    vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
 int    vn_start_secondary_write(struct vnode *vp, struct mount **mpp,
            int flags);
-int    vn_write_suspend_wait(struct vnode *vp, struct mount *mp,
-           int flags);
 int    vn_writechk(struct vnode *vp);
 int    vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace,
            const char *attrname, int *buflen, char *buf, struct thread *td);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to