From: David Howells Subject: Re: [PATCH 2/3] FS-Cache: Reduce cookie ref count if submit fails. Date: Tue, 29 Jul 2014 16:37:58 +0100 Message-ID: <28626.1406648278@warthog.procyon.org.uk> References: <53CE8862.7020201@adfin.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Shantanu Goel , NeilBrown , linux-kernel@vger.kernel.org, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org To: Milosz Tanski Return-path: In-Reply-To: <53CE8862.7020201@adfin.com> Content-ID: <28625.1406648278.1@warthog.procyon.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cachefs-bounces@redhat.com Errors-To: linux-cachefs-bounces@redhat.com List-Id: linux-fsdevel.vger.kernel.org Milosz Tanski wrote: > + wake_cookie = __fscache_unuse_cookie(cookie); > spin_unlock(&cookie->lock); > + if (wake_cookie) > + __fscache_wake_unused_cookie(cookie); Why do __fscache_unuse_cookie() with cookie->lock held? David