From: Niu Yawei Date: Wed, 2 Apr 2014 12:44:00 +0000 (-0400) Subject: LU-4853 ldiskfs: fix race in ldiskfs_ext_new_extent_cb X-Git-Tag: 2.5.58~34 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=a8065335e2588059b6c7e18357ea9ee4def50a68;hp=75ee8334498f948ecd030ad5edb22bc596f300fc;p=fs%2Flustre-release.git LU-4853 ldiskfs: fix race in ldiskfs_ext_new_extent_cb In ldiskfs_ext_calc_credits_for_insert(), we should use the 'depth' stored in the 'path' instead from inode, because the extent tree could have been changed when ldiskfs_ext_calc_credits_for_insert() is called (by ldiskfs_ext_new_extent_cb()). It was fixed in LU-2555, but the fix is missed in sles11sp2/ext4-misc.patch Signed-off-by: Niu Yawei Change-Id: I9ca349ba52060f10fc980721317ba47e10572473 Reviewed-on: http://review.whamcloud.com/9868 Tested-by: Jenkins Reviewed-by: Bob Glossman Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch index efa3eae..6e5e191 100644 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch +++ b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch @@ -99,7 +99,7 @@ + + if (path) { + /* probably there is space in leaf? */ -+ depth = ext_depth(inode); ++ depth = path->p_depth; + if (le16_to_cpu(path[depth].p_hdr->eh_entries) + < le16_to_cpu(path[depth].p_hdr->eh_max)) + return 1;