Fix a nasty runlist merge bug when merging two holes. (Anton)

(Logical change 1.677)
edge.strict_endians
cantab.net!aia21 2005-02-17 17:03:50 +00:00
parent 942f72b655
commit 9028469456
1 changed files with 4 additions and 1 deletions

View File

@ -111,8 +111,11 @@ static __inline__ BOOL ntfs_rl_are_mergeable(runlist_element *dst,
return FALSE;
}
if ((dst->lcn < 0) || (src->lcn < 0)) /* Are we merging holes? */
if ((dst->lcn < 0) || (src->lcn < 0)) { /* Are we merging holes? */
if (dst->lcn == LCN_HOLE && src->lcn == LCN_HOLE)
return TRUE;
return FALSE;
}
if ((dst->lcn + dst->length) != src->lcn) /* Are the runs contiguous? */
return FALSE;
if ((dst->vcn + dst->length) != src->vcn) /* Are the runs misaligned? */