Date: Sun, 5 Apr 2015 21:10:39 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281121 - head/sys/fs/msdosfs Message-ID: <201504052110.t35LAdRW059469@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Apr 5 21:10:38 2015 New Revision: 281121 URL: https://svnweb.freebsd.org/changeset/base/281121 Log: Do not call msdosfs_sync() on the read-only msdosfs mounts. In fact, it should be a nop for ro. PR: 199152 Reviewed by: bde (PR version of the patch) Submitted by: longwitz@incore.de MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Apr 5 21:08:04 2015 (r281120) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Apr 5 21:10:38 2015 (r281121) @@ -796,17 +796,17 @@ msdosfs_unmount(struct mount *mp, int mn struct msdosfsmount *pmp; int error, flags; - flags = 0; - error = msdosfs_sync(mp, MNT_WAIT); - if ((mntflags & MNT_FORCE) != 0) { + error = flags = 0; + pmp = VFSTOMSDOSFS(mp); + if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) + error = msdosfs_sync(mp, MNT_WAIT); + if ((mntflags & MNT_FORCE) != 0) flags |= FORCECLOSE; - } else if (error != 0) { + else if (error != 0) return (error); - } error = vflush(mp, 0, flags, curthread); if (error != 0 && error != ENXIO) return (error); - pmp = VFSTOMSDOSFS(mp); if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) { error = markvoldirty(pmp, 0); if (error && error != ENXIO) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504052110.t35LAdRW059469>