tree 781dcc0990fc42c26492206261d4b5f325715821
parent d8ec785e0bf2941ed546711c2f240a3e030c39c7
author Anton Altaparmakov <[EMAIL PROTECTED]> Fri, 18 Feb 2005 10:03:13 +0000
committer Anton Altaparmakov <[EMAIL PROTECTED]> Thu, 05 May 2005 11:03:01 +0100
NTFS: Fix a nasty runlist merge bug when merging two holes.
Signed-off-by: Anton Altaparmakov <[EMAIL PROTECTED]>
fs/ntfs/ChangeLog | 3 ++-
fs/ntfs/runlist.c | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -72,9 +72,10 @@ ToDo/Notes:
runlist. This allows us to find runlist elements with the runlist
lock already held without having to drop and reacquire it around the
call. Adapt all callers.
- - Change time to u64 time.h::ntfs2utc() as it otherwise generates a
+ - Change time to u64 in time.h::ntfs2utc() as it otherwise generates a
warning in the do_div() call on sparc32. Thanks to Meelis Roos for
the report and analysis of the warning.
+ - Fix a nasty runlist merge bug when merging two holes.
2.1.22 - Many bug and race fixes and error handling improvements.
diff --git a/fs/ntfs/runlist.c b/fs/ntfs/runlist.c
--- a/fs/ntfs/runlist.c
+++ b/fs/ntfs/runlist.c
@@ -113,8 +113,11 @@ static inline BOOL ntfs_are_rl_mergeable
BUG_ON(!dst);
BUG_ON(!src);
- 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? */
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html