summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-03-05 17:05:35 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-03-07 02:03:22 +0530
commitd092dff9a6e23d5fdef64154b6f3d6211f7482a6 (patch)
treeef7291557fd0bd49cc6c68b5f5a2addd5e8ae5a5 /xlators/performance/io-cache
parentcb602a1d7d41587c24379cb2636961ab91446f86 (diff)
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 <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 00d95857db1..4d5ffe29298 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 */