[PATCH] 2.4.0-ac11: small NTFS fixes

Anton Altaparmakov (aia21@cus.cam.ac.uk)
Thu, 25 Jan 2001 23:17:49 +0000 (GMT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-1804928587-980464669=:20503
Content-Type: TEXT/PLAIN; charset=US-ASCII

Alan,

Please apply attached ntfs patch for next 2.4.0-ac kernel release.

It fixes a long standing bug where values of lengths of runs were
considered unsigned when they are in fact signed numbers (both read and
write). Also it makes a correction to how negative mft_recordsizes are
handled.

Thanks go to Yuri Per <yuri@acronis.com> for the initial patch (which
required only a tiny modification).

Best regards,

Anton

-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

---559023410-1804928587-980464669=:20503 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ntfs-patch-2.4.0-ac11" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.SOL.3.96.1010125231749.20503B@draco.cus.cam.ac.uk> Content-Description:

ZGlmZiAtdXIgbGludXgtMi40LjAtYWMxMS12YW5pbGxhL2ZzL250ZnMvaW5v ZGUuYyBsaW51eC9mcy9udGZzL2lub2RlLmMNCi0tLSBsaW51eC0yLjQuMC1h YzExLXZhbmlsbGEvZnMvbnRmcy9pbm9kZS5jCVdlZCBKYW4gMjQgMjM6MjM6 NDYgMjAwMQ0KKysrIGxpbnV4L2ZzL250ZnMvaW5vZGUuYwlUaHUgSmFuIDI1 IDIzOjQyOjUyIDIwMDENCkBAIC00NDQsMTYgKzQ0NCwxNiBAQA0KIAkqY3R5 cGUgPSAwOw0KIAlzd2l0Y2ggKHR5cGUgJiAweEYpIHsNCiAJY2FzZSAxOiAN Ci0JCSpsZW5ndGggPSBOVEZTX0dFVFU4KCpkYXRhKTsNCisJCSpsZW5ndGgg PSBOVEZTX0dFVFM4KCpkYXRhKTsNCiA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ZnRfY2x1c3RlcnNfcGVyX3JlY29yZCkNCisJCQludGZzX2Vycm9y KCJVbmV4cGVjdGVkIGRhdGEgIzQgaW4gYm9vdCBibG9ja1xuIik7DQogCQl2 b2wtPm1mdF9yZWNvcmRzaXplID0gMSA8PCAoLXZvbC0+bWZ0X2NsdXN0ZXJz X3Blcl9yZWNvcmQpOw0KKwl9DQogCXZvbC0+aW5kZXhfcmVjb3Jkc2l6ZSA9 IHZvbC0+Y2x1c3RlcnNpemUgKg0KIAkJCQkJCXZvbC0+aW5kZXhfY2x1c3Rl cnNfcGVyX3JlY29yZDsNCiAJLyogRklYTUU6IGxvbmcgbG9uZyB2YWx1ZSAq Lw0K ---559023410-1804928587-980464669=:20503-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/