From dabc3751fa0a00afb5403a882e5d92b53c80aec0 Mon Sep 17 00:00:00 2001 From: girish Date: Thu, 16 Jul 2009 07:33:27 +0000 Subject: [PATCH] b=20147 i=adilger i=johann fix from upstream to use correct depth in extent header checking --- .../patches/ext4_ext_search_right-fix.patch | 24 ++++++++++++++++++++++ .../series/ldiskfs-2.6-rhel5-ext4.series | 1 + .../series/ldiskfs-2.6-sles11.series | 1 + 3 files changed, 26 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/ext4_ext_search_right-fix.patch 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 index 0000000..f505008 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4_ext_search_right-fix.patch @@ -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; + } diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series index 1ac0b51..17bc785 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series @@ -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_ext_search_right-fix.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series index b82357e..6d062da 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series @@ -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_ext_search_right-fix.patch -- 1.8.3.1