"Christos Zoulas" <chris...@netbsd.org> wrote: > Module Name: src > Committed By: christos > Date: Sat Nov 23 17:57:23 UTC 2013 > > Modified Files: > src/sys/coda: coda_vfsops.c > > Log Message: > replace open-coded scan with macro; fix locking >
- /* mount structure wasn't found */ - return(NULL); + mutex_exit(&mountlist_lock); + return mp == TAILQ_END(&mountlist) ? NULL : mp; Although this is correct, TAILQ_END(&mountlist) *suggests* access of mountlist. If it would be true, it would be unlocked and buggy access. Why not just "return mp;" ? It seems to me that TAILQ_END() makes the code more missleading without doing any good. What was the rationale behind adding and using it? -- Mindaugas