Author: kib
Date: Wed Dec  1 21:19:11 2010
New Revision: 216099
URL: http://svn.freebsd.org/changeset/base/216099

Log:
  Journal start looks up .sujournal file by doing lookup on the root dvp.
  As result, failed softdep_mount() might leave up to two vnodes on the
  mp mountlist, preventing mnt_ref from going to zero.
  
  Call ffs_flushfiles() after failed softdep_mount() to clean mountlist.
  
  Initial report by:    Garrett Cooper
  Reproduced and tested by:     pho

Modified:
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vfsops.c       Wed Dec  1 19:24:07 2010        
(r216098)
+++ head/sys/ufs/ffs/ffs_vfsops.c       Wed Dec  1 21:19:11 2010        
(r216099)
@@ -928,6 +928,7 @@ ffs_mountfs(devvp, mp, td)
                if ((fs->fs_flags & FS_DOSOFTDEP) &&
                    (error = softdep_mount(devvp, mp, fs, cred)) != 0) {
                        free(fs->fs_csp, M_UFSMNT);
+                       ffs_flushfiles(mp, FORCECLOSE, td);
                        goto out;
                }
                if (fs->fs_snapinum[0] != 0)
_______________________________________________
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