Whamcloud - gitweb
b=20147
authorgirish <girish>
Thu, 16 Jul 2009 07:33:27 +0000 (07:33 +0000)
committergirish <girish>
Thu, 16 Jul 2009 07:33:27 +0000 (07:33 +0000)
i=adilger
i=johann

fix from upstream to use correct depth in extent header checking

ldiskfs/kernel_patches/patches/ext4_ext_search_right-fix.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series

diff --git a/ldiskfs/kernel_patches/patches/ext4_ext_search_right-fix.patch b/ldiskfs/kernel_patches/patches/ext4_ext_search_right-fix.patch
new file mode 100644 (file)
index 0000000..f505008
--- /dev/null
@@ -0,0 +1,24 @@
+Index: linux-2.6.27.21-0.1/fs/ext4/extents.c
+===================================================================
+--- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c
++++ linux-2.6.27.21-0.1/fs/ext4/extents.c
+@@ -1119,7 +1119,8 @@ ext4_ext_search_right(struct inode *inod
+       struct ext4_extent_idx *ix;
+       struct ext4_extent *ex;
+       ext4_fsblk_t block;
+-      int depth, ee_len;
++      int depth; /* Note, NOT eh_depth; depth from top of tree */
++      int ee_len;
+       BUG_ON(path == NULL);
+       depth = path->p_depth;
+@@ -1176,7 +1177,8 @@ got_index:
+               if (bh == NULL)
+                       return -EIO;
+               eh = ext_block_hdr(bh);
+-              if (ext4_ext_check_header(inode, eh, depth)) {
++              /* subtract from p_depth to get proper eh_depth */
++              if (ext4_ext_check_header(inode, eh, path->p_depth - depth)) {
+                       put_bh(bh);
+                       return -EIO;
+               }
index 1ac0b51..17bc785 100644 (file)
@@ -21,3 +21,4 @@ ext4-alloc-policy-2.6-rhel5.patch
 ext4-misc-rhel5.patch
 ext4-convert-group-lock-rhel5.patch
 ext4-force_over_8tb-rhel5.patch
 ext4-misc-rhel5.patch
 ext4-convert-group-lock-rhel5.patch
 ext4-force_over_8tb-rhel5.patch
+ext4_ext_search_right-fix.patch
index b82357e..6d062da 100644 (file)
@@ -26,3 +26,4 @@ ext4-lock-cached_extent.patch
 ext4-convert-group-lock-sles11.patch
 ext4-force_over_8tb-sles11.patch
 ext4-claim_inode-free_inode-race.patch
 ext4-convert-group-lock-sles11.patch
 ext4-force_over_8tb-sles11.patch
 ext4-claim_inode-free_inode-race.patch
+ext4_ext_search_right-fix.patch