From 32418239aedb3367984845facdd6721c22fff18b Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 24 Jul 2015 15:26:07 +1000 Subject: [PATCH] Removed read locks around the device. We require no conrrent calls to ReadOp, and that ServeOps doesn't return until all ops have been responded to, so I believe this should be safe. In particular, fuseshim uses the locks only to exclude reads and writes during closing, not for anything else. --- connection.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/connection.go b/connection.go index 2d5d9ee..776de3e 100644 --- a/connection.go +++ b/connection.go @@ -224,13 +224,8 @@ func (c *Connection) readMessage() (m *buffer.InMessage, err error) { // Loop past transient errors. for { - // Lock and read. - // - // TODO(jacobsa): Ensure that we document concurrency constraints that make - // it safe, then kill the lock here. - c.wrapped.Rio.RLock() + // Attempt a reaed. err = m.Init(c.wrapped.Dev) - c.wrapped.Rio.RUnlock() // Special cases: //