Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261232AbVDNQmi (ORCPT ); Thu, 14 Apr 2005 12:42:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261542AbVDNQmi (ORCPT ); Thu, 14 Apr 2005 12:42:38 -0400 Received: from sigma957.CIS.McMaster.CA ([130.113.64.83]:57069 "EHLO sigma957.cis.mcmaster.ca") by vger.kernel.org with ESMTP id S261232AbVDNQlE (ORCPT ); Thu, 14 Apr 2005 12:41:04 -0400 Subject: [patch] inotify 0.22-2 From: John McCutchan To: linux-kernel@vger.kernel.org, Andrew Morton Content-Type: multipart/mixed; boundary="=-rEd1m2fod+9RMM/DgPRp" Date: Thu, 14 Apr 2005 12:42:17 -0400 Message-Id: <1113496937.17575.3.camel@vertex> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 X-PMX-Version-Mac: 4.7.1.128075, Antispam-Engine: 2.0.3.1, Antispam-Data: 2005.4.14.8 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_VERSION 0, __SANE_MSGID 0' X-Spam-Flag: NO Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 74225 Lines: 980 --=-rEd1m2fod+9RMM/DgPRp Content-Type: text/plain Content-Transfer-Encoding: 7bit Attached is inotify 0.22-2 against 2.6.12-rc2-mm1. This release fixes an OOPs introduced in inotify 0.22. -- John McCutchan --=-rEd1m2fod+9RMM/DgPRp Content-Disposition: attachment; filename=inotify-0.22-rml-2.6.12-rc2-mm1-2.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=inotify-0.22-rml-2.6.12-rc2-mm1-2.patch; charset=UTF-8 aW5vdGlmeSENCg0KaW5vdGlmeSBpcyBpbnRlbmRlZCB0byBjb3JyZWN0IHRoZSBkZWZpY2llbmNp ZX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GljaCBpcyBzZWxlY3QoKS1hYmxlLg0KICAgICAgICAqIGlub3RpZnkgaGFzIGFu IGV2ZW50IHRoYXQgc2F5cyAidGhlIGZpbGVzeXN0ZW0gdGhhdCB0aGUgaXRlbQ0KICAgICAgICAg IHlvdSB3ZXJlIHdhdGNoaW5nIGlzIG9uIHdhcyB1bm1vdW50ZWQuIg0KICAgICAgICAqIGlub3Rp ZnkgY2FuIHdhdGNoIGRpcmVjdG9yaWVzIG9yIGZpbGVzLg0KDQpJbm90aWZ5IGlzIGN1cnJlbnRs eSB1c2VkIGJ5IEJlYWdsZSAoYSBkZXNrdG9wIHNlYXJjaCBpbmZyYXN0cnVjdHVyZSkNCmFuZCBH YW1pbiAoYSBGQU0gcmVwbGFjZW1lbnQpLg0KDQpTaWduZWQtb2ZmLWJ5OiBSb2JlcnQgTG92ZSA8 cm1sQG5vdmVsbC5jb20+DQoNCiBEb2N1bWVudGF0aW9uL2ZpbGVzeXN0ZW1zL2lub3RpZnkudHh0 IHwgICA4MSArKw0KIGZzL0tjb25maWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDEz IA0KIGZzL01ha2VmaWxlICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAxIA0KIGZzL2F0 dHIuYyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDMzIC0NCiBmcy9jb21wYXQuYyAg ICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAxMiANCiBmcy9maWxlX3RhYmxlLmMgICAgICAg ICAgICAgICAgICAgICAgIHwgICAgMyANCiBmcy9pbm9kZS5jICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHwgICAgNiANCiBmcy9pbm90aWZ5LmMgICAgICAgICAgICAgICAgICAgICAgICAgIHwg IDk2MSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrDQogZnMvbmFtZWkuYyAgICAg ICAgICAgICAgICAgICAgICAgICAgICB8ICAgMzAgLQ0KIGZzL29wZW4uYyAgICAgICAgICAg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WxvY2tlZCBzaG0gPyAqLw0KZGlmZiAtdXJOIGxpbnV4LTIu Ni4xMi1yYzItbW0xL2tlcm5lbC91c2VyLmMgbGludXgva2VybmVsL3VzZXIuYw0KLS0tIGxpbnV4 LTIuNi4xMi1yYzItbW0xL2tlcm5lbC91c2VyLmMJMjAwNS0wNC0wNSAxMjo0MDowMy4wMDAwMDAw MDAgLTA0MDANCisrKyBsaW51eC9rZXJuZWwvdXNlci5jCTIwMDUtMDQtMDUgMTI6NDE6NTEuMDAw MDAwMDAwIC0wNDAwDQpAQCAtMTIwLDYgKzEyMCwxMCBAQA0KIAkJYXRvbWljX3NldCgmbmV3LT5w cm9jZXNzZXMsIDApOw0KIAkJYXRvbWljX3NldCgmbmV3LT5maWxlcywgMCk7DQogCQlhdG9taWNf c2V0KCZuZXctPnNpZ3BlbmRpbmcsIDApOw0KKyNpZmRlZiBDT05GSUdfSU5PVElGWQ0KKwkJYXRv bWljX3NldCgmbmV3LT5pbm90aWZ5X3dhdGNoZXMsIDApOw0KKwkJYXRvbWljX3NldCgmbmV3LT5p bm90aWZ5X2RldnMsIDApOw0KKyNlbmRpZg0KIA0KIAkJbmV3LT5tcV9ieXRlcyA9IDA7DQogCQlu ZXctPmxvY2tlZF9zaG0gPSAwOw0K --=-rEd1m2fod+9RMM/DgPRp-- - 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/