+++ /dev/null
-From stable-bounces@linux.kernel.org Mon Jun 13 15:56:08 2005
-Date: Mon, 13 Jun 2005 15:56:36 -0700
-From: Andrew Morton <akpm@osdl.org>
-To: stable@kernel.org
-Cc: akpm@osdl.org, jack@suse.cz, mingo@elte.hu
-Subject: [PATCH] cond_resched_lock() fix
-
-
-From: Jan Kara <jack@suse.cz>
-
-On one path, cond_resched_lock() fails to return true if it dropped the lock.
-We think this might be causing the crashes in JBD's log_do_checkpoint().
-
-Cc: Ingo Molnar <mingo@elte.hu>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Chris Wright <chrisw@osdl.org>
----
-
- kernel/sched.c | 7 +++++--
- 1 files changed, 5 insertions(+), 2 deletions(-)
-
-Index: release-2.6.11/kernel/sched.c
-===================================================================
---- release-2.6.11.orig/kernel/sched.c
-+++ release-2.6.11/kernel/sched.c
-@@ -3788,11 +3788,14 @@ EXPORT_SYMBOL(cond_resched);
- */
- int cond_resched_lock(spinlock_t * lock)
- {
-+ int ret = 0;
-+
- #if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)
- if (lock->break_lock) {
- lock->break_lock = 0;
- spin_unlock(lock);
- cpu_relax();
-+ ret = 1;
- spin_lock(lock);
- }
- #endif
-@@ -3800,10 +3803,10 @@ int cond_resched_lock(spinlock_t * lock)
- _raw_spin_unlock(lock);
- preempt_enable_no_resched();
- __cond_resched();
-+ ret = 1;
- spin_lock(lock);
-- return 1;
- }
-- return 0;
-+ return ret;
- }
-
- EXPORT_SYMBOL(cond_resched_lock);