Commit 2a5992a6 authored by Dave Jones's avatar Dave Jones

[PATCH] Fix race in JFS

From Christoph Hellwig

http://oss.software.ibm.com/pipermail/jfs-patches/2002-March/000045.html
parent 7348d519
......@@ -2778,6 +2778,7 @@ int jfs_lazycommit(void)
complete(&jfsIOwait);
do {
LAZY_LOCK(flags);
restart:
WorkDone = 0;
while ((tblk = TxAnchor.unlock_queue)) {
......@@ -2789,7 +2790,6 @@ int jfs_lazycommit(void)
*/
WorkDone = 1;
LAZY_LOCK(flags);
/*
* Remove first transaction from queue
*/
......@@ -2809,11 +2809,13 @@ int jfs_lazycommit(void)
current->state = TASK_RUNNING;
schedule();
}
LAZY_LOCK(flags);
}
if (WorkDone)
goto restart;
LAZY_UNLOCK(flags);
set_current_state(TASK_INTERRUPTIBLE);
schedule();
} while (!jfs_thread_stopped());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment