Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19890/libntfs
Modified Files:
dir.c
Log Message:
ntfs_create: add for any case check
Index: dir.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/dir.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- dir.c 19 Feb 2006 00:37:15 -0000 1.55
+++ dir.c 23 Feb 2006 00:29:04 -0000 1.56
@@ -1314,6 +1314,17 @@ err_out:
"inode 0x%llx. Run chkdsk.\n",
(unsigned long long)ni->mft_no);
}
+ /*
+ * Free extent MFT records (should not exist any with current
+ * ntfs_create implementation, but for any case if something will be
+ * changed in the future).
+ */
+ while (ni->nr_extents)
+ if (ntfs_mft_record_free(ni->vol, *(ni->extent_nis))) {
+ err = errno;
+ ntfs_log_error("Failed to free extent MFT record. "
+ "Leaving inconsistent metadata.\n");
+ }
if (ntfs_mft_record_free(ni->vol, ni))
ntfs_log_error("Failed to free MFT record. "
"Leaving inconsistent metadata. Run chkdsk.\n");
|