From: Anton Altaparmakov Date: Wed, 19 Oct 2005 11:23:10 +0000 (+0100) Subject: NTFS: Fix serious data corruption issue when writing. X-Git-Tag: v2.6.15-rc1~59^2~4^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5aeaef37dc9cb009ab5cb8abf325338d21d2b1a;p=linux-2.6 NTFS: Fix serious data corruption issue when writing. Many thanks to Alberto Patino for testing and reporting the data corruption. And many apologies for corrupting his partition. Signed-off-by: Anton Altaparmakov --- diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index 5fb341a16b..a142bf3ba1 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -787,6 +787,7 @@ retry_remap: vcn_len = rl[1].vcn - vcn; lcn_block = lcn << (vol->cluster_size_bits - blocksize_bits); + cdelta = 0; /* * If the number of remaining clusters in the * @pages is smaller or equal to the number of