From: Sapan Bhatia Date: Thu, 3 Apr 2008 20:46:17 +0000 (+0000) Subject: Added a consistency check. X-Git-Tag: linux-2.6-22-2~11 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=16fac0d09380f0e3c606fb1eb561b41563bd6607;p=linux-2.6.git Added a consistency check. --- diff --git a/kernel-2.6.spec b/kernel-2.6.spec index bc69c8886..ccf9fde22 100644 --- a/kernel-2.6.spec +++ b/kernel-2.6.spec @@ -141,6 +141,7 @@ Patch000: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-%{rpmversion}.bz2 Patch010: linux-2.6-010-e1000e.patch Patch020: linux-2.6-020-build-id.patch Patch030: linux-2.6-030-netns.patch +Patch040: linux-2.6-040-i_mutex-check.patch # These are patches picked up from Fedora/RHEL Patch100: linux-2.6-100-build-nonintconfig.patch @@ -333,6 +334,7 @@ KERNEL_PREVIOUS=vanilla %if 0%{?with_netns} %ApplyPatch 30 %endif +%ApplyPatch 40 %ApplyPatch 100 diff --git a/linux-2.6-040-i_mutex-check.patch b/linux-2.6-040-i_mutex-check.patch new file mode 100644 index 000000000..3cfb78b1f --- /dev/null +++ b/linux-2.6-040-i_mutex-check.patch @@ -0,0 +1,19 @@ +diff -Nurb linux-2.6.22-20/fs/inode.c linux-2.6.22-40/fs/inode.c +--- linux-2.6.22-20/fs/inode.c 2007-07-08 19:32:17.000000000 -0400 ++++ linux-2.6.22-40/fs/inode.c 2008-04-03 16:41:53.000000000 -0400 +@@ -122,6 +122,7 @@ + inode->i_fop = &empty_fops; + inode->i_nlink = 1; + atomic_set(&inode->i_writecount, 0); ++ mutex_init(&inode->i_mutex); + inode->i_size = 0; + inode->i_blocks = 0; + inode->i_bytes = 0; +@@ -1102,6 +1103,7 @@ + + if (op && op->drop_inode) + drop = op->drop_inode; ++ BUG_ON(atomic_read(&inode->i_mutex.count)!=1); + drop(inode); + } +