make ntfs_cluster_free not fail if ntfs_attr_find_vcn returned ENOENT

(Logical change 1.470)
edge.strict_endians
(none)!yura 2004-08-03 17:53:48 +00:00
parent b996e483e3
commit 0c92486d08
1 changed files with 6 additions and 2 deletions

View File

@ -849,8 +849,12 @@ int ntfs_cluster_free(ntfs_volume *vol, ntfs_attr *na, VCN start_vcn, s64 count)
}
rl = ntfs_attr_find_vcn(na, start_vcn);
if (!rl)
return -1;
if (!rl) {
if (errno == ENOENT)
return 0;
else
return -1;
}
if (rl->lcn < 0 && rl->lcn != LCN_HOLE) {
errno = EIO;