summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 3cf5b32b01d..40dee7a7d6c 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -869,22 +869,15 @@ out:
}
int
-afr_selfheal_data (call_frame_t *frame, xlator_t *this, inode_t *inode)
+afr_selfheal_data (call_frame_t *frame, xlator_t *this, fd_t *fd)
{
afr_private_t *priv = NULL;
unsigned char *locked_on = NULL;
int ret = 0;
- fd_t *fd = NULL;
+ inode_t *inode = fd->inode;
priv = this->private;
- ret = afr_selfheal_data_open (this, inode, &fd);
- if (!fd) {
- gf_msg_debug (this->name, -ret, "%s: Failed to open",
- uuid_utoa (inode->gfid));
- return -EIO;
- }
-
locked_on = alloca0 (priv->child_count);
ret = afr_selfheal_tie_breaker_inodelk (frame, this, inode,
@@ -911,8 +904,5 @@ unlock:
afr_selfheal_uninodelk (frame, this, inode, priv->sh_domain, 0, 0,
locked_on);
- if (fd)
- fd_unref (fd);
-
return ret;
}