From: Greg Kroah-Hartman Date: Fri, 12 Dec 2008 05:05:19 +0000 (-0800) Subject: 2 patches for .27 X-Git-Tag: v2.6.27.10~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b700c26e8b4911fdefea84dc0ee4f6ed8c95856;p=thirdparty%2Fkernel%2Fstable-queue.git 2 patches for .27 --- diff --git a/review-2.6.27/powerpc-use-cpu_thread_in_core-in-smp_init-for-of_spin_map.patch b/review-2.6.27/powerpc-use-cpu_thread_in_core-in-smp_init-for-of_spin_map.patch new file mode 100644 index 00000000000..b8085b2ca64 --- /dev/null +++ b/review-2.6.27/powerpc-use-cpu_thread_in_core-in-smp_init-for-of_spin_map.patch @@ -0,0 +1,87 @@ +From 6a75a6b8e85e92cc774d42a4e113c76c30b5a539 Mon Sep 17 00:00:00 2001 +From: Milton Miller +Date: Mon, 20 Oct 2008 15:37:03 +0000 +Subject: powerpc: Use cpu_thread_in_core in smp_init for of_spin_map + +From: Milton Miller + +commit 6a75a6b8e85e92cc774d42a4e113c76c30b5a539 upstream. + +We used to assume that even numbered threads were the primary +threads, ie those that would be listed and started as a cpu from +open firmware. Replace a left over is even (% 2) check with a check +for it being a primary thread and update the comments. + +Tested with a debug print on pseries, identical code found for cell. + +Signed-off-by: Milton Miller +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/cell/smp.c | 10 +++------- + arch/powerpc/platforms/pseries/smp.c | 13 ++++--------- + 2 files changed, 7 insertions(+), 16 deletions(-) + +--- a/arch/powerpc/platforms/cell/smp.c ++++ b/arch/powerpc/platforms/cell/smp.c +@@ -54,8 +54,8 @@ + #endif + + /* +- * The primary thread of each non-boot processor is recorded here before +- * smp init. ++ * The Primary thread of each non-boot processor was started from the OF client ++ * interface by prom_hold_cpus and is spinning on secondary_hold_spinloop. + */ + static cpumask_t of_spin_map; + +@@ -208,11 +208,7 @@ void __init smp_init_cell(void) + /* Mark threads which are still spinning in hold loops. */ + if (cpu_has_feature(CPU_FTR_SMT)) { + for_each_present_cpu(i) { +- if (i % 2 == 0) +- /* +- * Even-numbered logical cpus correspond to +- * primary threads. +- */ ++ if (cpu_thread_in_core(i) == 0) + cpu_set(i, of_spin_map); + } + } else { +--- a/arch/powerpc/platforms/pseries/smp.c ++++ b/arch/powerpc/platforms/pseries/smp.c +@@ -52,8 +52,8 @@ + + + /* +- * The primary thread of each non-boot processor is recorded here before +- * smp init. ++ * The Primary thread of each non-boot processor was started from the OF client ++ * interface by prom_hold_cpus and is spinning on secondary_hold_spinloop. + */ + static cpumask_t of_spin_map; + +@@ -191,8 +191,7 @@ static void __devinit smp_pSeries_kick_c + static int smp_pSeries_cpu_bootable(unsigned int nr) + { + /* Special case - we inhibit secondary thread startup +- * during boot if the user requests it. Odd-numbered +- * cpus are assumed to be secondary threads. ++ * during boot if the user requests it. + */ + if (system_state < SYSTEM_RUNNING && + cpu_has_feature(CPU_FTR_SMT) && +@@ -229,11 +228,7 @@ static void __init smp_init_pseries(void + /* Mark threads which are still spinning in hold loops. */ + if (cpu_has_feature(CPU_FTR_SMT)) { + for_each_present_cpu(i) { +- if (i % 2 == 0) +- /* +- * Even-numbered logical cpus correspond to +- * primary threads. +- */ ++ if (cpu_thread_in_core(i) == 0) + cpu_set(i, of_spin_map); + } + } else { diff --git a/review-2.6.27/series b/review-2.6.27/series index cabfeef648d..c48a8c8f595 100644 --- a/review-2.6.27/series +++ b/review-2.6.27/series @@ -80,3 +80,5 @@ powerpc-virtex5-fix-virtex5-machine-check-handling.patch acpi-delete-osi-dmi-dmesg-spam.patch cifs-fix-a-regression-in-cifs-umount-codepath.patch pnp-make-the-resource-type-an-unsigned-long.patch +powerpc-use-cpu_thread_in_core-in-smp_init-for-of_spin_map.patch +xfs-fix-hang-after-disallowed-rename-across-directory-quota-domains.patch diff --git a/review-2.6.27/xfs-fix-hang-after-disallowed-rename-across-directory-quota-domains.patch b/review-2.6.27/xfs-fix-hang-after-disallowed-rename-across-directory-quota-domains.patch new file mode 100644 index 00000000000..8ad3ebfa970 --- /dev/null +++ b/review-2.6.27/xfs-fix-hang-after-disallowed-rename-across-directory-quota-domains.patch @@ -0,0 +1,38 @@ +From 576a488a27f267af203f3ea69c700a1612335e9f Mon Sep 17 00:00:00 2001 +From: Dave Chinner +Date: Thu, 4 Dec 2008 09:09:34 +1100 +Subject: XFS: Fix hang after disallowed rename across directory quota domains + +From: Dave Chinner + +commit 576a488a27f267af203f3ea69c700a1612335e9f upstream. + +When project quota is active and is being used for directory tree +quota control, we disallow rename outside the current directory +tree. This requires a check to be made after all the inodes +involved in the rename are locked. We fail to unlock the inodes +correctly if we disallow the rename when the target is outside the +current directory tree. This results in a hang on the next access +to the inodes involved in failed rename. + +Reported-by: Arkadiusz Miskiewicz +Signed-off-by: Dave Chinner +Tested-by: Arkadiusz Miskiewicz +Signed-off-by: Lachlan McIlroy +Signed-off-by: Greg Kroah-Hartman + +--- + fs/xfs/xfs_rename.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/xfs/xfs_rename.c ++++ b/fs/xfs/xfs_rename.c +@@ -212,7 +212,7 @@ xfs_rename( + if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && + (target_dp->i_d.di_projid != src_ip->i_d.di_projid))) { + error = XFS_ERROR(EXDEV); +- xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED); ++ xfs_rename_unlock4(inodes, XFS_ILOCK_EXCL); + xfs_trans_cancel(tp, cancel_flags); + goto std_return; + }