Skip to contentSkip to conversation

nilfs: exchange yield() on cond_resched() call in nilfs_transaction_lock() method

PATCH New Vyacheslav Dubeyko 1 participant 1 message Jan 29, 2013

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

PATCH 1/1 nilfs: exchange yield() on cond_resched() call in nilfs_transaction_lock() method

From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH] nilfs: exchange yield() on cond_resched() call in nilfs_transaction_lock() method

This patch exchanges yield() on cond_reshed() call in nilfs_transaction_lock() method. The comment of yield() recommends to use cond_reshed() as proper solution in the case of want to be 'nice' for others threads.

---
 fs/nilfs2/segment.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/segment.c +1 -1
index a5752a58..8ced7e1 100644
@@ -316,7 +316,7 @@ static void nilfs_transaction_lock(struct super_block *sb,
 		nilfs_segctor_do_immediate_flush(sci);
 
 		up_write(&nilfs->ns_segctor_sem);
-		yield();
+		cond_resched();
 	}
 	if (gcflag)
 		ti->ti_flags |= NILFS_TI_GC;
Signature · 8 lines
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html