[kernel/f15] Fix ext4 corrupted bitmap error path (pointed out by Eric Sandeen)
Josh Boyer
jwboyer at fedoraproject.org
Tue Jan 10 19:14:10 UTC 2012
commit 5e426638533530dac74d88490d3a4b4712fb59c4
Author: Josh Boyer <jwboyer at redhat.com>
Date: Tue Jan 10 14:08:28 2012 -0500
Fix ext4 corrupted bitmap error path (pointed out by Eric Sandeen)
...error-handling-on-inode-bitmap-corruption.patch | 19 +++++++++++++++++++
kernel.spec | 7 +++++++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/ext4-Fix-error-handling-on-inode-bitmap-corruption.patch b/ext4-Fix-error-handling-on-inode-bitmap-corruption.patch
new file mode 100644
index 0000000..e22a2b4
--- /dev/null
+++ b/ext4-Fix-error-handling-on-inode-bitmap-corruption.patch
@@ -0,0 +1,19 @@
+diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
+index 00beb4f..8fb6844 100644
+--- a/fs/ext4/ialloc.c
++++ b/fs/ext4/ialloc.c
+@@ -885,8 +885,12 @@ got:
+ if (IS_DIRSYNC(inode))
+ ext4_handle_sync(handle);
+ if (insert_inode_locked(inode) < 0) {
+- err = -EINVAL;
+- goto fail_drop;
++ /*
++ * Likely a bitmap corruption causing inode to be allocated
++ * twice.
++ */
++ err = -EIO;
++ goto fail;
+ }
+ spin_lock(&sbi->s_next_gen_lock);
+ inode->i_generation = sbi->s_next_generation++;
diff --git a/kernel.spec b/kernel.spec
index a62c94d..a4e875f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -731,6 +731,8 @@ Patch21056: KVM-fix-device-assignment-permissions.patch
#rhbz 770233
Patch21065: Bluetooth-Add-support-for-BCM20702A0.patch
+Patch21071: ext4-Fix-error-handling-on-inode-bitmap-corruption.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1356,6 +1358,8 @@ ApplyPatch Bluetooth-Add-support-for-BCM20702A0.patch
#rhbz 770096
ApplyPatch KVM-fix-device-assignment-permissions.patch
+ApplyPatch ext4-Fix-error-handling-on-inode-bitmap-corruption.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2003,6 +2007,9 @@ fi
# and build.
%changelog
+* Tue Jan 10 2012 Josh Boyer <jwboyer at redhat.com>
+- Fix ext4 corrupted bitmap error path (pointed out by Eric Sandeen)
+
* Fri Jan 06 2012 Josh Boyer <jwboyer at redhat.com> 2.6.41.8-1
- Linux 3.1.8
More information about the scm-commits
mailing list