Skip to contentSkip to conversation

staging: lustre: Remove yield() call

PATCH New Thomas Avery 1 participant 1 message Mar 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: Remove yield() call

Remove yield() call. In this case it's use is considered broken, since it is being assumed that yield() will let another process run that will make the event true.

---
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/obd_config.c +1 -1
index 997c0f9aafb5..277576b586db 100644
@@ -455,7 +455,7 @@ static int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
 	spin_unlock(&obd->obd_dev_lock);
 
 	while (obd->obd_conn_inprogress > 0)
-		yield();
+		cond_resched();
 	smp_rmb();
 
 	if (lcfg->lcfg_bufcount >= 2 && LUSTRE_CFG_BUFLEN(lcfg, 1) > 0) {
Signature · 1 line
2.11.0