Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 24 Mar 2003 07:46:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 24 Mar 2003 07:46:54 -0500 Received: from [211.167.76.68] ([211.167.76.68]:15264 "HELO soulinfo") by vger.kernel.org with SMTP id ; Mon, 24 Mar 2003 07:46:27 -0500 Date: Mon, 24 Mar 2003 20:55:02 +0800 From: hugang To: linux-kernel@vger.kernel.org Subject: back port 2.5.65-mm4 ext3 patch to 2.4.20 Message-Id: <20030324205502.7d4b015d.hugang@soulinfo.com> X-Mailer: Sylpheed version 0.8.10claws13 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Mon__24_Mar_2003_20:55:02_+0800_08793ca0" =?ISO-8859-1?Q?=CA=D5=BC=FE=C8=CB=A3=BA: ?= linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 46194 Lines: 618 This is a multi-part message in MIME format. --Multipart_Mon__24_Mar_2003_20:55:02_+0800_08793ca0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello: This patch base on Andrew Morton's 2.5.65-mm4. -- Hu Gang / Steve Email : huagng@soulinfo.com, linuxbest@sina.com GPG FinePrint: 4099 3F1D AE01 1817 68F7 D499 A6C2 C418 86C8 610E Registered Linux User 204016 --Multipart_Mon__24_Mar_2003_20:55:02_+0800_08793ca0 Content-Type: application/octet-stream; name="2_4_20_ext3_orlov_no_blk.patch" Content-Disposition: attachment; filename="2_4_20_ext3_orlov_no_blk.patch" Content-Transfer-Encoding: base64 ZGlmZiAtcnUgLi9mcy9leHQzL2lhbGxvYy5jIC9ob21lL2h1Z2FuZy9kZXZlL2N2cy9sb2NhbC9r ZXJuZWwvZXh0M18yNC9mcy9leHQzL2lhbGxvYy5jCi0tLSAuL2ZzL2V4dDMvaWFsbG9jLmMJ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gaW5saW5lIGhhbmRsZV90ICpqYmRfYWxsb2Nf aGFuZGxlKGludCBnZnBfZmxhZ3MpCit7CisJcmV0dXJuIGttZW1fY2FjaGVfYWxsb2MoamJkX2hh bmRsZV9jYWNoZSwgZ2ZwX2ZsYWdzKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGpiZF9mcmVl X2hhbmRsZShoYW5kbGVfdCAqaGFuZGxlKQoreworCWttZW1fY2FjaGVfZnJlZShqYmRfaGFuZGxl X2NhY2hlLCBoYW5kbGUpOworfQogCiAvKiBQcmltYXJ5IHJldm9rZSBzdXBwb3J0ICovCiAjZGVm aW5lIEpPVVJOQUxfUkVWT0tFX0RFRkFVTFRfSEFTSCAyNTYK --Multipart_Mon__24_Mar_2003_20:55:02_+0800_08793ca0-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/