mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
ntfs_create: add for any case check
This commit is contained in:
parent
45c9aa137e
commit
b0f4e5099e
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user