int ntfs_extent_mft_record_free (ntfs_inode * ni, MFT_RECORD * m);
Free the mapped extent mft record m of the extent ntfs inode ni.
Note that this function unmaps the mft record and closes and destroys ni internally and hence you cannot use either ni nor m any more after this function returns success.
On success return 0 and on error return -errno. ni and m are still valid in this case and have not been freed.
For some errors an error message is displayed and the success code 0 is returned and the volume is then left dirty on umount. This makes sense in case we could not rollback the changes that were already done since the caller no longer wants to reference this mft record so it does not matter to the caller if something is wrong with it as long as it is properly detached from the base inode.