Date: Fri, 11 Nov 2016 20:04:19 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r308550 - stable/10/sys/fs/msdosfs Message-ID: <201611112004.uABK4JvP013750@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Nov 11 20:04:19 2016 New Revision: 308550 URL: https://svnweb.freebsd.org/changeset/base/308550 Log: MFC r308023: If the fatchain() call in chainalloc() returned an error, revert marking the cluster run as in-use. Modified: stable/10/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfs_fat.c Fri Nov 11 20:01:56 2016 (r308549) +++ stable/10/sys/fs/msdosfs/msdosfs_fat.c Fri Nov 11 20:04:19 2016 (r308550) @@ -731,8 +731,11 @@ chainalloc(pmp, start, count, fillwith, pmp->pm_nxtfree = CLUST_FIRST; pmp->pm_flags |= MSDOSFS_FSIMOD; error = fatchain(pmp, start, count, fillwith); - if (error != 0) + if (error != 0) { + for (cl = start, n = count; n-- > 0;) + usemap_free(pmp, cl++); return (error); + } #ifdef MSDOSFS_DEBUG printf("clusteralloc(): allocated cluster chain at %lu (%lu clusters)\n", start, count);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611112004.uABK4JvP013750>