summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2014-01-26 22:08:46 +0000
committerAnand Avati <avati@redhat.com>2014-02-12 17:35:43 -0800
commita9181877e3013dcaca5b59ef7764246163c10585 (patch)
treeb9d3e6bdcaf0cbe44c582822e1c092edc52e08c0 /xlators
parentdb3b2149eeb44bcb716d994224d57eccf873d2a9 (diff)
performance/io-cache: Fix dereferencing of freed pointer
Change-Id: Ic4276c6d76c36f4eb77282dc06d2b8b212b58f08 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6822 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/performance/io-cache/src/page.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c
index a21b318169c..416cd5fe44e 100644
--- a/xlators/performance/io-cache/src/page.c
+++ b/xlators/performance/io-cache/src/page.c
@@ -136,6 +136,7 @@ int64_t
ioc_page_destroy (ioc_page_t *page)
{
int64_t ret = 0;
+ struct ioc_inode *inode = NULL;
if (page == NULL) {
goto out;
@@ -143,9 +144,10 @@ ioc_page_destroy (ioc_page_t *page)
ioc_inode_lock (page->inode);
{
+ inode = page->inode;
ret = __ioc_page_destroy (page);
}
- ioc_inode_unlock (page->inode);
+ ioc_inode_unlock (inode);
out:
return ret;
@@ -1032,6 +1034,7 @@ ioc_waitq_t *
ioc_page_error (ioc_page_t *page, int32_t op_ret, int32_t op_errno)
{
ioc_waitq_t *waitq = NULL;
+ struct ioc_inode *inode = NULL;
if (page == NULL) {
goto out;
@@ -1039,9 +1042,10 @@ ioc_page_error (ioc_page_t *page, int32_t op_ret, int32_t op_errno)
ioc_inode_lock (page->inode);
{
+ inode = page->inode;
waitq = __ioc_page_error (page, op_ret, op_errno);
}
- ioc_inode_unlock (page->inode);
+ ioc_inode_unlock (inode);
out:
return waitq;