summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-12-05 03:06:40 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-05 00:49:25 -0800
commit73ef824cbb8a468b70b57e503c98c226aed813a7 (patch)
tree4d77d18e856471ed3720f4e3aceaaddfd3ac0793 /xlators/cluster/afr
parent3e86687e74bdf4847f3e35063dfb46e9871d6959 (diff)
cluster/afr: Fix inode_ref's for local->cont.lookup.inode
Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 57af6f34225..c93d719d639 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -357,6 +357,10 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this)
if (local->cont.lookup.xattr) {
dict_unref (local->cont.lookup.xattr);
}
+
+ if (local->cont.lookup.inode) {
+ inode_unref (local->cont.lookup.inode);
+ }
}
{ /* getxattr */
@@ -750,7 +754,7 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie,
if (local->op_errno != ESTALE)
local->op_ret = op_ret;
- local->cont.lookup.inode = inode;
+ local->cont.lookup.inode = inode_ref (inode);
local->cont.lookup.xattr = dict_ref (xattr);
local->cont.lookup.xattrs[child_index] = dict_ref (xattr);
local->cont.lookup.postparent = *postparent;
@@ -783,7 +787,7 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie,
local->cont.lookup.xattr = dict_ref (xattr);
- local->cont.lookup.inode = inode;
+ local->cont.lookup.inode = inode_ref (inode);
local->cont.lookup.xattrs[child_index] = dict_ref (xattr);
local->cont.lookup.postparent = *postparent;
@@ -878,7 +882,7 @@ afr_revalidate_lookup_cbk (call_frame_t *frame, void *cookie,
if (local->op_errno != ESTALE)
local->op_ret = op_ret;
- local->cont.lookup.inode = inode;
+ local->cont.lookup.inode = inode_ref (inode);
local->cont.lookup.xattr = dict_ref (xattr);
local->cont.lookup.xattrs[child_index] = dict_ref (xattr);
local->cont.lookup.postparent = *postparent;
@@ -912,7 +916,7 @@ afr_revalidate_lookup_cbk (call_frame_t *frame, void *cookie,
if (local->cont.lookup.xattr)
dict_unref (local->cont.lookup.xattr);
- local->cont.lookup.inode = inode;
+ local->cont.lookup.inode = inode_ref (inode);
local->cont.lookup.xattr = dict_ref (xattr);
local->cont.lookup.xattrs[child_index] = dict_ref (xattr);
local->cont.lookup.postparent = *postparent;