[PATCH] use cond_resched() in 2.5 tree
Christoph Hellwig <[email protected]> Sun, 14 Jul 2002 14:31:00 +0100
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
simple janitoral code cleanup
Index: fs/jfs/jfs_txnmgr.c
===================================================================
RCS file: /usr/cvs/jfs/linux25/fs/jfs/jfs_txnmgr.c,v
retrieving revision 1.28
diff -u -r1.28 jfs_txnmgr.c
--- fs/jfs/jfs_txnmgr.c 10 Jul 2002 16:01:16 -0000 1.28
+++ fs/jfs/jfs_txnmgr.c 14 Jul 2002 13:29:08 -0000
@@ -2824,10 +2824,7 @@
* We can be running indefinately if other processors
* are adding transactions to this list
*/
- if (need_resched()) {
- current->state = TASK_RUNNING;
- schedule();
- }
+ cond_resched();
LAZY_LOCK(flags);
}
@@ -2945,10 +2942,7 @@
* Just to be safe. I don't know how
* long we can run without blocking
*/
- if (need_resched()) {
- current->state = TASK_RUNNING;
- schedule();
- }
+ cond_resched();
TXN_LOCK();
} else {
/* We can't get the write lock. It may