[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Holding alloc_sem in jffs2_mark_node_obsolete().

We check for the alloc_sem being held in jffs2_mark_node_obsolete(). 
Thomas -- are you seeing the BUG() below? If not, why not? We can get here 
from read_inode() without the alloc_sem being held, AFAICT. If this 
debugging check has served its purpose and made us fix all the places where 
we weren't holding alloc_sem for long enough during writes, I suspect we 
can take it out again now, and stop getting alloc_sem solely to placate 
this rather than for real reasons. OK?

	/* We've changed the rules slightly. After
	   writing a node you now mustn't drop the
	   alloc_sem before you've finished all the
	   list management - this is so that when we
	   get here, we know that no other nodes have
	   been written, and the above check on wbuf
	   is valid - wbuf_len is nonzero IFF the node
	   which obsoletes this node is still in the

	   So we BUG() if that new rule is broken, to
	   make sure we catch it and fix it.
	if (!down_trylock(&c->alloc_sem)) {
		printk(KERN_CRIT "jffs2_mark_node_obsolete() called with wbuf active but alloc_sem not locked!\n");


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com