From d092dff9a6e23d5fdef64154b6f3d6211f7482a6 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Thu, 5 Mar 2009 17:05:35 +0530 Subject: fixed deadlock in io-cache ioc_create_cbk was holding inode->lock and calling inode_ctx_put, which also holds the same lock. Signed-off-by: Anand V. Avati --- xlators/performance/io-cache/src/io-cache.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xlators/performance/io-cache/src') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 00d95857d..4d5ffe292 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -700,12 +700,9 @@ ioc_create_cbk (call_frame_t *frame, weight = ioc_get_priority (table, path); ioc_inode = ioc_inode_update (table, inode, weight); - LOCK (&fd->inode->lock); - { - inode_ctx_put (fd->inode, this, - (uint64_t)(long)ioc_inode); - } - UNLOCK (&fd->inode->lock); + + inode_ctx_put (fd->inode, this, + (uint64_t)(long)ioc_inode); } /* If mandatory locking has been enabled on this file, we disable caching on it */ -- cgit