patch-2.4.20 linux-2.4.20/drivers/ide/ataraid.c
Next file: linux-2.4.20/drivers/ide/ide-cd.c
Previous file: linux-2.4.20/drivers/ide/Makefile
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Thu Nov 28 15:53:13 2002
- Orig file:
linux-2.4.19/drivers/ide/ataraid.c
- Orig date:
Thu Oct 25 13:58:35 2001
diff -urN linux-2.4.19/drivers/ide/ataraid.c linux-2.4.20/drivers/ide/ataraid.c
@@ -121,11 +121,8 @@
void *ptr = NULL;
while (!ptr) {
ptr=kmalloc(sizeof(struct buffer_head),GFP_NOIO);
- if (!ptr) {
- __set_current_state(TASK_RUNNING);
- current->policy |= SCHED_YIELD;
- schedule();
- }
+ if (!ptr)
+ yield();
}
return ptr;
}
@@ -137,11 +134,8 @@
void *ptr = NULL;
while (!ptr) {
ptr=kmalloc(sizeof(struct ataraid_bh_private),GFP_NOIO);
- if (!ptr) {
- __set_current_state(TASK_RUNNING);
- current->policy |= SCHED_YIELD;
- schedule();
- }
+ if (!ptr)
+ yield();
}
return ptr;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)