Fixed moving the standard information attribute to an extended MFT record (Szabolcs Szakacsits)

N2009_11_14_FIXES
jpandre 2009-02-27 08:15:06 +00:00
parent ddfb2175a9
commit 571c057d05
1 changed files with 6 additions and 5 deletions

View File

@ -3908,14 +3908,15 @@ static int ntfs_resident_attr_resize(ntfs_attr *na, const s64 newsize)
ntfs_log_perror("%s: Attribute lookup failed 1", __FUNCTION__);
goto put_err_out;
}
/* We can't move out attribute list, thus move out others. */
if (na->type == AT_ATTRIBUTE_LIST) {
/*
* The standard information and attribute list attributes can't be
* moved out from the base MFT record, so try to move out others.
*/
if (na->type==AT_STANDARD_INFORMATION || na->type==AT_ATTRIBUTE_LIST) {
ntfs_attr_put_search_ctx(ctx);
if (ntfs_inode_free_space(na->ni, offsetof(ATTR_RECORD,
non_resident_end) + 8)) {
ntfs_log_perror("Couldn't free space in the MFT record to "
"make attribute list non resident");
ntfs_log_perror("Could not free space in MFT record");
return -1;
}
return ntfs_resident_attr_resize(na, newsize);