diff options
author | Vikas Gorur <vikas@zresearch.com> | 2009-03-05 17:05:35 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-03-07 02:03:22 +0530 |
commit | d092dff9a6e23d5fdef64154b6f3d6211f7482a6 (patch) | |
tree | ef7291557fd0bd49cc6c68b5f5a2addd5e8ae5a5 /xlators/performance/io-cache/src/io-cache.c | |
parent | cb602a1d7d41587c24379cb2636961ab91446f86 (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/src/io-cache.c')
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 9 |
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 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 */ |