summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2011-09-07 20:03:24 -0400
committerAnand Avati <avati@gluster.com>2011-09-07 23:48:01 -0700
commit694ef54978f382507a5127ce66da7770929ba2c2 (patch)
treeb98ee679c8d5f4b3556c0bf9af44e6b9729c2881 /xlators/cluster/afr/src
parent81530d227deb52af38c7df770aef2200b9de539f (diff)
Eliminate many "var set but not used" warnings with newer gcc.
This fixes ~200 such warnings, but leaves three categories untouched. (1) Rpcgen code. (2) Macros which set variables in the outer (calling function) scope. (3) Variables which are set via function calls which may have side effects. Change-Id: I6554555f78ed26134251504b038da7e94adacbcd BUG: 2550 Reviewed-on: http://review.gluster.com/371 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-common.c4
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c4
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c4
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c44
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.c12
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c10
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c13
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c12
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c4
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c2
-rw-r--r--xlators/cluster/afr/src/pump.c14
11 files changed, 0 insertions, 123 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index a6738280695..9803744a0ec 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -429,9 +429,7 @@ afr_inode_rm_stale_children (xlator_t *this, inode_t *inode, int32_t read_child,
int32_t *stale_children)
{
afr_inode_params_t params = {0};
- afr_private_t *priv = NULL;
- priv = this->private;
GF_ASSERT (read_child >= 0);
GF_ASSERT (stale_children);
@@ -1155,14 +1153,12 @@ afr_lookup_select_read_child (afr_local_t *local, xlator_t *this,
int ret = -1;
dict_t **xattrs = NULL;
int32_t *success_children = NULL;
- struct iatt *bufs = NULL;
afr_transaction_type type = AFR_METADATA_TRANSACTION;
GF_ASSERT (local);
GF_ASSERT (this);
GF_ASSERT (local->success_count > 0);
- bufs = local->cont.lookup.bufs;
success_children = local->cont.lookup.success_children;
/*We can take the success_children[0] only because we already
*handle the conflicting children other wise, we could select the
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index ec3639ff73b..d323e6d5fd5 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -484,15 +484,11 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
gf_dirent_t *entries)
{
- afr_private_t * priv = NULL;
afr_local_t * local = NULL;
gf_dirent_t * entry = NULL;
gf_dirent_t * tmp = NULL;
- int child_index = -1;
- priv = this->private;
local = frame->local;
- child_index = (long) cookie;
if (op_ret == -1)
goto out;
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 1c25d160689..9a17c20309b 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -1509,12 +1509,10 @@ afr_unlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *postparent)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
int call_count = -1;
int child_index = (long) cookie;
local = frame->local;
- priv = this->private;
LOCK (&frame->lock);
{
@@ -1709,13 +1707,11 @@ afr_rmdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *postparent)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
int call_count = -1;
int child_index = (long) cookie;
int read_child = 0;
local = frame->local;
- priv = this->private;
LOCK (&frame->lock);
{
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 2168ee26f69..483d7250e43 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -652,11 +652,9 @@ afr_unlock_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
afr_local_t *local = NULL;
- afr_internal_lock_t *int_lock = NULL;
int32_t child_index = (long)cookie;
local = frame->local;
- int_lock = &local->internal_lock;
afr_trace_entrylk_out (frame, AFR_ENTRYLK_TRANSACTION,
AFR_UNLOCK_OP, NULL, op_ret,
@@ -732,13 +730,10 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_private_t *priv = NULL;
- int done = 0;
int child_index = (long) cookie;
local = frame->local;
int_lock = &local->internal_lock;
- priv = this->private;
LOCK (&frame->lock);
{
@@ -750,7 +745,6 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"please load features/locks xlator on server");
local->op_ret = op_ret;
int_lock->lock_op_ret = op_ret;
- done = 1;
}
local->child_up[child_index] = 0;
@@ -796,7 +790,6 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
afr_local_t *local = NULL;
loc_t *lower = NULL;
loc_t *higher = NULL;
- const char *lower_name = NULL;
const char *higher_name = NULL;
int child_index = (long) cookie;
@@ -838,10 +831,6 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&local->transaction.new_parent_loc,
local->transaction.new_basename);
- lower_name = (lower == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
higher = (lower == &local->transaction.parent_loc ?
&local->transaction.new_parent_loc :
&local->transaction.parent_loc);
@@ -916,11 +905,8 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
- afr_fd_ctx_t *fd_ctx = NULL;
loc_t *lower = NULL;
- loc_t *higher = NULL;
const char *lower_name = NULL;
- const char *higher_name = NULL;
struct gf_flock flock = {0,};
uint64_t ctx = 0;
int ret = 0;
@@ -951,8 +937,6 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
return 0;
}
- fd_ctx = (afr_fd_ctx_t *)(long) ctx;
-
/* skip over children that or down
or don't have the fd open */
@@ -1042,14 +1026,6 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
local->transaction.basename :
local->transaction.new_basename);
- higher = (lower == &local->transaction.parent_loc ?
- &local->transaction.new_parent_loc :
- &local->transaction.parent_loc);
-
- higher_name = (higher == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
afr_trace_entrylk_in (frame, AFR_ENTRYLK_TRANSACTION,
AFR_LOCK_OP, lower_name, child_index);
@@ -1137,13 +1113,11 @@ afr_nonblocking_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_private_t *priv = NULL;
int call_count = 0;
int child_index = (long) cookie;
local = frame->local;
int_lock = &local->internal_lock;
- priv = this->private;
afr_trace_entrylk_out (frame, AFR_ENTRYLK_TRANSACTION,
AFR_LOCK_OP, NULL, op_ret,
@@ -1312,13 +1286,11 @@ afr_nonblocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_private_t *priv = NULL;
int call_count = 0;
int child_index = (long) cookie;
local = frame->local;
int_lock = &local->internal_lock;
- priv = this->private;
afr_trace_inodelk_out (frame, AFR_INODELK_NB_TRANSACTION,
AFR_LOCK_OP, NULL, op_ret,
@@ -1589,7 +1561,6 @@ afr_post_unlock_lower_cbk (call_frame_t *frame, xlator_t *this)
afr_local_t *local = NULL;
loc_t *lower = NULL;
loc_t *higher = NULL;
- const char *lower_name = NULL;
const char *higher_name = NULL;
local = frame->local;
@@ -1600,10 +1571,6 @@ afr_post_unlock_lower_cbk (call_frame_t *frame, xlator_t *this)
&local->transaction.new_parent_loc,
local->transaction.new_basename);
- lower_name = (lower == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
higher = (lower == &local->transaction.parent_loc ?
&local->transaction.new_parent_loc :
&local->transaction.parent_loc);
@@ -1632,9 +1599,7 @@ afr_rename_unlock (call_frame_t *frame, xlator_t *this)
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
loc_t *lower = NULL;
- loc_t *higher = NULL;
const char *lower_name = NULL;
- const char *higher_name = NULL;
local = frame->local;
int_lock = &local->internal_lock;
@@ -1648,15 +1613,6 @@ afr_rename_unlock (call_frame_t *frame, xlator_t *this)
local->transaction.basename :
local->transaction.new_basename);
- higher = (lower == &local->transaction.parent_loc ?
- &local->transaction.new_parent_loc :
- &local->transaction.parent_loc);
-
- higher_name = (higher == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
-
if (__is_lower_locked (frame, this)) {
gf_log (this->name, GF_LOG_DEBUG,
"unlocking lower");
diff --git a/xlators/cluster/afr/src/afr-self-heal-algorithm.c b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
index 63889c8452b..48399b5e93d 100644
--- a/xlators/cluster/afr/src/afr-self-heal-algorithm.c
+++ b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
@@ -95,14 +95,12 @@ static int
sh_loop_driver_done (call_frame_t *sh_frame, xlator_t *this,
call_frame_t *last_loop_frame)
{
- afr_private_t *priv = NULL;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
afr_sh_algo_private_t *sh_priv = NULL;
int32_t total_blocks = 0;
int32_t diff_blocks = 0;
- priv = this->private;
local = sh_frame->local;
sh = &local->self_heal;
sh_priv = sh->private;
@@ -358,18 +356,13 @@ static int
sh_loop_return (call_frame_t *sh_frame, xlator_t *this, call_frame_t *loop_frame,
int32_t op_ret, int32_t op_errno)
{
- afr_private_t * priv = NULL;
afr_local_t * loop_local = NULL;
afr_self_heal_t * loop_sh = NULL;
afr_local_t * sh_local = NULL;
afr_self_heal_t *sh = NULL;
- afr_sh_algo_private_t *sh_priv = NULL;
-
- priv = this->private;
sh_local = sh_frame->local;
sh = &sh_local->self_heal;
- sh_priv = sh->private;
if (loop_frame) {
loop_local = loop_frame->local;
@@ -405,7 +398,6 @@ sh_loop_write_cbk (call_frame_t *loop_frame, void *cookie, xlator_t *this,
call_frame_t *sh_frame = NULL;
afr_local_t * sh_local = NULL;
afr_self_heal_t *sh = NULL;
- afr_sh_algo_private_t *sh_priv = NULL;
int call_count = 0;
int child_index = 0;
@@ -416,7 +408,6 @@ sh_loop_write_cbk (call_frame_t *loop_frame, void *cookie, xlator_t *this,
sh_frame = loop_sh->sh_frame;
sh_local = sh_frame->local;
sh = &sh_local->self_heal;
- sh_priv = sh->private;
child_index = (long) cookie;
@@ -631,7 +622,6 @@ sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this)
afr_private_t *priv = NULL;
afr_local_t *loop_local = NULL;
afr_self_heal_t *loop_sh = NULL;
- afr_sh_algo_private_t *loop_sh_priv = NULL;
int call_count = 0;
int i = 0;
@@ -639,8 +629,6 @@ sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this)
loop_local = loop_frame->local;
loop_sh = &loop_local->self_heal;
- loop_sh_priv = loop_sh->private;
-
call_count = loop_sh->active_sinks + 1; /* sinks and source */
loop_local->call_count = call_count;
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 0846184c29f..169d549d9c6 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1241,12 +1241,8 @@ afr_sh_missing_entries_lookup_cbk (call_frame_t *frame, void *cookie,
{
int call_count = 0;
afr_local_t *local = NULL;
- afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
- sh = &local->self_heal;
- priv = this->private;
afr_sh_common_lookup_resp_handler (frame, cookie, this, op_ret,
op_errno, inode, buf, xattr,
@@ -1852,11 +1848,9 @@ afr_sh_entrylk (call_frame_t *frame, xlator_t *this, loc_t *loc,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_self_heal_t *sh = NULL;
local = frame->local;
int_lock = &local->internal_lock;
- sh = &local->self_heal;
int_lock->transaction_lk_type = AFR_SELFHEAL_LK;
int_lock->selfheal_lk_type = AFR_ENTRY_SELF_HEAL_LK;
@@ -1876,15 +1870,11 @@ static int
afr_self_heal_parent_entrylk (call_frame_t *frame, xlator_t *this,
afr_lock_cbk_t lock_cbk)
{
- afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
- int_lock = &local->internal_lock;
sh = &local->self_heal;
- priv = this->private;
gf_log (this->name, GF_LOG_TRACE,
"attempting to recreate missing entries for path=%s",
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 009ac705be3..cbc6d6e39a1 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -76,11 +76,9 @@ afr_sh_data_done (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
sh->completion_cbk (frame, this);
@@ -253,14 +251,12 @@ afr_sh_data_setattr_fstat_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
struct iatt *buf)
{
- afr_private_t *priv = NULL;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
int child_index = (long) cookie;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
GF_ASSERT (sh->source == child_index);
if (op_ret != -1)
@@ -535,12 +531,10 @@ afr_sh_data_sync_prepare (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
struct afr_sh_algorithm *sh_algo = NULL;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
sh->algo_completion_cbk = afr_sh_data_erase_pending;
sh->algo_abort_cbk = afr_sh_data_fail;
@@ -815,12 +809,10 @@ afr_lookup_select_read_child_by_txn_type (xlator_t *this, afr_local_t *local,
int32_t nsources = 0;
int32_t prev_read_child = -1;
int32_t config_read_child = -1;
- afr_self_heal_t *sh = NULL;
priv = this->private;
bufs = local->cont.lookup.bufs;
success_children = local->cont.lookup.success_children;
- sh = &local->self_heal;
pending_matrix = afr_create_pending_matrix (priv->child_count);
if (NULL == pending_matrix)
@@ -1165,11 +1157,9 @@ afr_sh_data_lock_rec (call_frame_t *frame, xlator_t *this, off_t start, off_t le
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_self_heal_t *sh = NULL;
local = frame->local;
int_lock = &local->internal_lock;
- sh = &local->self_heal;
int_lock->transaction_lk_type = AFR_SELFHEAL_LK;
int_lock->selfheal_lk_type = AFR_DATA_SELF_HEAL_LK;
@@ -1227,13 +1217,10 @@ afr_sh_data_lock (call_frame_t *frame, xlator_t *this,
afr_lock_cbk_t failure_handler)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
afr_self_heal_t * sh = NULL;
-
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
sh->data_lock_success_handler = success_handler;
sh->data_lock_failure_handler = failure_handler;
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index ddca2619db8..8f1c9698607 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -54,11 +54,9 @@ afr_sh_entry_done (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
if (sh->healing_fd)
fd_unref (sh->healing_fd);
@@ -420,13 +418,11 @@ afr_sh_entry_expunge_remove_cbk (call_frame_t *expunge_frame, void *cookie,
afr_local_t *expunge_local = NULL;
afr_self_heal_t *expunge_sh = NULL;
int active_src = 0;
- call_frame_t *frame = NULL;
int32_t valid = 0;
priv = this->private;
expunge_local = expunge_frame->local;
expunge_sh = &expunge_local->self_heal;
- frame = expunge_sh->sh_frame;
active_src = (long) cookie;
@@ -941,7 +937,6 @@ afr_sh_entry_impunge_setattr_cbk (call_frame_t *impunge_frame, void *cookie,
afr_self_heal_t *sh = NULL;
afr_self_heal_t *impunge_sh = NULL;
call_frame_t *frame = NULL;
- int active_src = 0;
int child_index = 0;
int32_t impunge_ret_child = 0;
@@ -951,7 +946,6 @@ afr_sh_entry_impunge_setattr_cbk (call_frame_t *impunge_frame, void *cookie,
frame = impunge_sh->sh_frame;
local = frame->local;
sh = &local->self_heal;
- active_src = impunge_sh->active_source;
child_index = (long) cookie;
if (op_ret == 0) {
@@ -992,14 +986,12 @@ afr_sh_entry_impunge_xattrop_cbk (call_frame_t *impunge_frame, void *cookie,
{
afr_private_t *priv = NULL;
afr_local_t *impunge_local = NULL;
- afr_self_heal_t *impunge_sh = NULL;
int child_index = 0;
struct iatt stbuf = {0};
int32_t valid = 0;
priv = this->private;
impunge_local = impunge_frame->local;
- impunge_sh = &impunge_local->self_heal;
child_index = (long) cookie;
@@ -1352,7 +1344,6 @@ afr_sh_entry_impunge_symlink_unlink_cbk (call_frame_t *impunge_frame,
int child_index = -1;
call_frame_t *frame = NULL;
int call_count = -1;
- int active_src = -1;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
int32_t impunge_ret_child = 0;
@@ -1363,7 +1354,6 @@ afr_sh_entry_impunge_symlink_unlink_cbk (call_frame_t *impunge_frame,
frame = impunge_sh->sh_frame;
local = frame->local;
sh = &local->self_heal;
- active_src = impunge_sh->active_source;
child_index = (long) cookie;
@@ -1763,7 +1753,6 @@ afr_sh_entry_impunge_entry_cbk (call_frame_t *impunge_frame, void *cookie,
int call_count = 0;
int child_index = 0;
call_frame_t *frame = NULL;
- int active_src = 0;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
int32_t impunge_ret_child = 0;
@@ -1775,7 +1764,6 @@ afr_sh_entry_impunge_entry_cbk (call_frame_t *impunge_frame, void *cookie,
local = frame->local;
sh = &local->self_heal;
child_index = (long) cookie;
- active_src = impunge_sh->active_source;
if ((op_ret == -1 && op_errno == ENOENT)
|| (IA_ISLNK (impunge_sh->impunging_entry_mode))) {
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index fb92cd999ed..ba411853530 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -560,13 +560,9 @@ afr_sh_metadata_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t *local = NULL;
int call_count = 0;
- int child_index = 0;
-
local = frame->local;
- child_index = (long) cookie;
-
afr_sh_common_lookup_resp_handler (frame, cookie, this, op_ret,
op_errno, inode, buf, xattr,
postparent, &local->loc);
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index e9b8ee7dcdf..b40e171030f 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -718,12 +718,10 @@ afr_changelog_pre_op_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = this->private;
- loc_t * loc = NULL;
int call_count = -1;
int child_index = (long) cookie;
local = frame->local;
- loc = &local->loc;
LOCK (&frame->lock);
{
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c
index d27ecd21526..9cc4cf3c34e 100644
--- a/xlators/cluster/afr/src/pump.c
+++ b/xlators/cluster/afr/src/pump.c
@@ -218,7 +218,6 @@ static int
pump_save_path (xlator_t *this, const char *path)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
pump_state_t state;
dict_t *dict = NULL;
loc_t loc = {0};
@@ -230,7 +229,6 @@ pump_save_path (xlator_t *this, const char *path)
return 0;
priv = this->private;
- pump_priv = priv->pump_private;
GF_ASSERT (priv->root_inode);
@@ -352,14 +350,12 @@ static gf_boolean_t
is_pump_traversal_allowed (xlator_t *this, const char *path)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
pump_state_t state;
const char *resume_path = NULL;
gf_boolean_t ret = _gf_true;
priv = this->private;
- pump_priv = priv->pump_private;
state = pump_get_state ();
@@ -404,7 +400,6 @@ static int
gf_pump_traverse_directory (loc_t *loc)
{
xlator_t *this = NULL;
- afr_private_t *priv = NULL;
fd_t *fd = NULL;
off_t offset = 0;
@@ -422,7 +417,6 @@ gf_pump_traverse_directory (loc_t *loc)
INIT_LIST_HEAD (&entries.list);
this = THIS;
- priv = this->private;
GF_ASSERT (loc->inode);
@@ -553,12 +547,10 @@ static int
pump_update_resume_path (xlator_t *this)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
const char *resume_path = NULL;
priv = this->private;
- pump_priv = priv->pump_private;
resume_path = pump_get_resume_path (this);
@@ -583,7 +575,6 @@ pump_xattr_cleaner (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
loc_t loc = {0};
int i = 0;
int ret = 0;
@@ -591,7 +582,6 @@ pump_xattr_cleaner (call_frame_t *frame, void *cookie, xlator_t *this,
int sink = 1;
priv = this->private;
- pump_priv = priv->pump_private;
build_root_loc (priv->root_inode, &loc);
@@ -779,12 +769,10 @@ pump_task_completion (int ret, call_frame_t *sync_frame, void *data)
{
xlator_t *this = NULL;
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
this = THIS;
priv = this->private;
- pump_priv = priv->pump_private;
inode_unref (priv->root_inode);
STACK_DESTROY (sync_frame->root);
@@ -1579,11 +1567,9 @@ static int
afr_setxattr_unwind (call_frame_t *frame, xlator_t *this)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
call_frame_t *main_frame = NULL;
local = frame->local;
- priv = this->private;
LOCK (&frame->lock);
{