From 5ada40e108cb148b5d837963f3139e9f1212826b Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Sat, 5 Jan 2013 04:00:27 -0500 Subject: [PATCH] LU-2555 fsfilt: 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()). Signed-off-by: Niu Yawei Change-Id: I04dada849a71228980501ab7eb1cc9ab71ca3782 Reviewed-on: http://review.whamcloud.com/4957 Reviewed-by: Alex Zhuravlev Reviewed-by: Bobi Jam Tested-by: Hudson Tested-by: Maloo --- ldiskfs/kernel_patches/patches/ext4-misc-rhel6.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldiskfs/kernel_patches/patches/ext4-misc-rhel6.patch b/ldiskfs/kernel_patches/patches/ext4-misc-rhel6.patch index eac6168..f84dda6 100644 --- a/ldiskfs/kernel_patches/patches/ext4-misc-rhel6.patch +++ b/ldiskfs/kernel_patches/patches/ext4-misc-rhel6.patch @@ -99,7 +99,7 @@ Index: linux-stage/fs/ext4/extents.c + + 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; -- 1.8.3.1