summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-cmd-volume.c4
-rw-r--r--cli/src/cli.c12
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c11
-rw-r--r--libglusterfs/src/call-stub.c6
-rw-r--r--libglusterfs/src/fd.c4
-rw-r--r--libglusterfs/src/graph.c4
-rw-r--r--libglusterfs/src/graph.y5
-rw-r--r--libglusterfs/src/inode.c10
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c3
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c26
-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
-rw-r--r--xlators/cluster/dht/src/dht-common.c20
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c2
-rw-r--r--xlators/cluster/dht/src/dht-rename.c2
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c2
-rw-r--r--xlators/debug/io-stats/src/io-stats.c7
-rw-r--r--xlators/features/locks/src/entrylk.c2
-rw-r--r--xlators/features/marker/src/marker-quota.c56
-rw-r--r--xlators/features/quiesce/src/quiesce.c57
-rw-r--r--xlators/features/quota/src/quota.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-log-ops.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c5
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c23
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h4
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c2
-rw-r--r--xlators/nfs/server/src/mount3.c2
-rw-r--r--xlators/nfs/server/src/nfs-fops.c4
-rw-r--r--xlators/nfs/server/src/nfs.c2
-rw-r--r--xlators/nfs/server/src/nfs3.c4
-rw-r--r--xlators/performance/write-behind/src/write-behind.c3
-rw-r--r--xlators/protocol/client/src/client-lk.c5
-rw-r--r--xlators/protocol/client/src/client.c3
-rw-r--r--xlators/protocol/server/src/server-handshake.c2
-rw-r--r--xlators/storage/posix/src/posix-helpers.c6
-rw-r--r--xlators/storage/posix/src/posix.c16
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c3
51 files changed, 2 insertions, 479 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index b61eb31c0bc..68c5ef57870 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1186,11 +1186,9 @@ cli_cmd_log_level_cbk (struct cli_state *state, struct cli_cmd_word *word,
rpc_clnt_procedure_t *proc = NULL;
call_frame_t *frame = NULL;
dict_t *dict = NULL;
- int parse_error = 0;
if (wordcount != 6) {
cli_usage_out (word->pattern);
- parse_error = 1;
goto out;
}
@@ -1220,11 +1218,9 @@ cli_cmd_volume_status_cbk (struct cli_state *state,
rpc_clnt_procedure_t *proc = NULL;
call_frame_t *frame = NULL;
dict_t *dict = NULL;
- int parse_error = 0;
if (wordcount != 3) {
cli_usage_out (word->pattern);
- parse_error = 1;
goto out;
}
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 51270f8a00a..858c7091b8d 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -271,7 +271,6 @@ cli_submit_request (void *req, call_frame_t *frame,
{
int ret = -1;
int count = 0;
- char start_ping = 0;
struct iovec iov = {0, };
struct iobuf *iobuf = NULL;
char new_iobref = 0;
@@ -314,17 +313,6 @@ cli_submit_request (void *req, call_frame_t *frame,
ret = rpc_clnt_submit (global_rpc, prog, procnum, cbkfn,
&iov, count,
NULL, 0, iobref, frame, NULL, 0, NULL, 0, NULL);
-
- if (ret == 0) {
- pthread_mutex_lock (&global_rpc->conn.lock);
- {
- if (!global_rpc->conn.ping_started) {
- start_ping = 1;
- }
- }
- pthread_mutex_unlock (&global_rpc->conn.lock);
- }
-
ret = 0;
out:
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index a55ceebde51..cb7db7cea56 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -772,16 +772,10 @@ int
glusterfs_rpcsvc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event,
void *data)
{
- xlator_t *this = NULL;
- rpc_transport_t *xprt = NULL;
-
if (!xl || !data) {
goto out;
}
- this = xl;
- xprt = data;
-
switch (event) {
case RPCSVC_EVENT_ACCEPT:
{
@@ -1031,12 +1025,9 @@ mgmt_pmap_signout_cbk (struct rpc_req *req, struct iovec *iov, int count,
void *myframe)
{
pmap_signout_rsp rsp = {0,};
- call_frame_t *frame = NULL;
int ret = 0;
glusterfs_ctx_t *ctx = NULL;
- frame = myframe;
-
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
@@ -1058,8 +1049,6 @@ mgmt_pmap_signout_cbk (struct rpc_req *req, struct iovec *iov, int count,
goto out;
}
out:
-// if (frame)
-// STACK_DESTROY (frame->root);
return 0;
}
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 67543c64a13..8761b40a0c6 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -3822,12 +3822,8 @@ call_stub_destroy_unwind (call_stub_t *stub)
void
call_stub_destroy (call_stub_t *stub)
{
- struct mem_pool *tmp_pool = NULL;
-
GF_VALIDATE_OR_GOTO ("call-stub", stub, out);
- tmp_pool = stub->stub_mem_pool;
-
if (stub->wind) {
call_stub_destroy_wind (stub);
} else {
@@ -3837,8 +3833,6 @@ call_stub_destroy (call_stub_t *stub)
stub->stub_mem_pool = NULL;
mem_put (stub);
out:
- tmp_pool = NULL;
-
return;
}
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index d6c4806a11a..7779dfe2551 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -383,7 +383,6 @@ fd_destroy (fd_t *fd)
xlator_t *xl = NULL;
int i = 0;
xlator_t *old_THIS = NULL;
- struct mem_pool *tmp_pool = NULL;
if (fd == NULL){
gf_log_callingfn ("xlator", GF_LOG_ERROR, "invalid arugument");
@@ -397,8 +396,6 @@ fd_destroy (fd_t *fd)
if (!fd->_ctx)
goto out;
- tmp_pool = fd->inode->table->fd_mem_pool;
-
if (IA_ISDIR (fd->inode->ia_type)) {
for (i = 0; i < fd->xl_count; i++) {
if (fd->_ctx[i].key) {
@@ -429,7 +426,6 @@ fd_destroy (fd_t *fd)
inode_unref (fd->inode);
fd->inode = (inode_t *)0xaaaaaaaa;
mem_put (fd);
- tmp_pool = NULL;
out:
return;
}
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
index 1d7d943e66e..7844a547551 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -283,7 +283,6 @@ gf_add_cmdline_options (glusterfs_graph_t *graph, cmd_args_t *cmd_args)
int
glusterfs_graph_validate_options (glusterfs_graph_t *graph)
{
- volume_opt_list_t *vol_opt = NULL;
xlator_t *trav = NULL;
int ret = -1;
char *errstr = NULL;
@@ -294,9 +293,6 @@ glusterfs_graph_validate_options (glusterfs_graph_t *graph)
if (list_empty (&trav->volume_options))
continue;
- vol_opt = list_entry (trav->volume_options.next,
- volume_opt_list_t, list);
-
ret = xlator_options_validate (trav, trav->options, &errstr);
if (ret) {
gf_log (trav->name, GF_LOG_ERROR,
diff --git a/libglusterfs/src/graph.y b/libglusterfs/src/graph.y
index 10aa4546b2e..62c57dd6c5f 100644
--- a/libglusterfs/src/graph.y
+++ b/libglusterfs/src/graph.y
@@ -445,8 +445,6 @@ preprocess (FILE *srcfp, FILE *dstfp)
char in_backtick = 0;
int line = 1;
int column = 0;
- int backtick_line = 0;
- int backtick_column = 0;
int character = 0;
@@ -484,9 +482,6 @@ preprocess (FILE *srcfp, FILE *dstfp)
} else {
i = 0;
cmd[i] = '\0';
-
- backtick_column = column;
- backtick_line = line;
}
in_backtick = !in_backtick;
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 1b43203113f..7f938236738 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -134,14 +134,11 @@ __dentry_unhash (dentry_t *dentry)
static void
__dentry_unset (dentry_t *dentry)
{
- struct mem_pool *tmp_pool = NULL;
-
if (!dentry) {
gf_log_callingfn (THIS->name, GF_LOG_WARNING, "dentry not found");
return;
}
- tmp_pool = dentry->inode->table->dentry_pool;
__dentry_unhash (dentry);
list_del_init (&dentry->inode_list);
@@ -155,8 +152,6 @@ __dentry_unset (dentry_t *dentry)
}
mem_put (dentry);
- tmp_pool = NULL;
-
}
@@ -307,7 +302,6 @@ __inode_destroy (inode_t *inode)
int index = 0;
xlator_t *xl = NULL;
xlator_t *old_THIS = NULL;
- struct mem_pool *tmp_pool = NULL;
if (!inode) {
gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found");
@@ -319,8 +313,6 @@ __inode_destroy (inode_t *inode)
goto noctx;
}
- tmp_pool = inode->table->inode_pool;
-
for (index = 0; index < inode->table->xl->graph->xl_count; index++) {
if (inode->_ctx[index].xl_key) {
xl = (xlator_t *)(long)inode->_ctx[index].xl_key;
@@ -337,8 +329,6 @@ noctx:
LOCK_DESTROY (&inode->lock);
// memset (inode, 0xb, sizeof (*inode));
mem_put (inode);
- tmp_pool = NULL;
-
}
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index acc4b0e571b..b09f47ed3e8 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -310,7 +310,6 @@ saved_frames_unwind (struct saved_frames *saved_frames)
{
struct saved_frame *trav = NULL;
struct saved_frame *tmp = NULL;
- struct mem_pool *saved_frames_pool = NULL;
struct tm *frame_sent_tm = NULL;
char timestr[256] = {0,};
@@ -341,8 +340,6 @@ saved_frames_unwind (struct saved_frames *saved_frames)
trav->rpcreq->rpc_status = -1;
trav->rpcreq->cbkfn (trav->rpcreq, &iov, 1, trav->frame);
- saved_frames_pool
- = trav->rpcreq->conn->rpc_clnt->saved_frames_pool;
rpc_clnt_reply_deinit (trav->rpcreq,
trav->rpcreq->conn->rpc_clnt->reqpool);
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index e881484600d..b88b884d590 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -491,8 +491,6 @@ __rdma_create_read_chunks (rdma_peer_t *peer, rdma_ioq_t *entry,
rdma_request_context_t *request_ctx)
{
int32_t ret = -1;
- rdma_device_t *device = NULL;
- rdma_private_t *priv = NULL;
int pos = 0;
GF_VALIDATE_OR_GOTO (RDMA_LOG_NAME, peer, out);
@@ -501,9 +499,6 @@ __rdma_create_read_chunks (rdma_peer_t *peer, rdma_ioq_t *entry,
GF_VALIDATE_OR_GOTO (RDMA_LOG_NAME, *ptr, out);
GF_VALIDATE_OR_GOTO (RDMA_LOG_NAME, request_ctx, out);
- priv = peer->trans->private;
- device = priv->device;
-
request_ctx->iobref = iobref_ref (entry->iobref);
if (type == rdma_areadch) {
@@ -1013,7 +1008,7 @@ __rdma_ioq_churn_request (rdma_peer_t *peer, rdma_ioq_t *entry,
}
if ((wtype != rdma_noch) || (rtype != rdma_noch)) {
- request_ctx = mem_get (priv->device->request_ctx_pool);
+ request_ctx = mem_get (device->request_ctx_pool);
if (request_ctx == NULL) {
ret = -1;
goto out;
@@ -1021,7 +1016,7 @@ __rdma_ioq_churn_request (rdma_peer_t *peer, rdma_ioq_t *entry,
memset (request_ctx, 0, sizeof (*request_ctx));
- request_ctx->pool = priv->device->request_ctx_pool;
+ request_ctx->pool = device->request_ctx_pool;
request_ctx->peer = peer;
entry->msg.request.rpc_req->conn_private = request_ctx;
@@ -1156,11 +1151,6 @@ __rdma_send_reply_inline (rdma_peer_t *peer, rdma_ioq_t *entry,
rdma_header_t *header = NULL;
int32_t send_size = 0, ret = 0;
char *buf = NULL;
- rdma_private_t *priv = NULL;
- rdma_device_t *device = NULL;
-
- priv = peer->trans->private;
- device = priv->device;
send_size = iov_length (entry->rpchdr, entry->rpchdr_count)
+ iov_length (entry->proghdr, entry->proghdr_count)
@@ -1440,14 +1430,9 @@ __rdma_send_reply_type_nomsg (rdma_peer_t *peer, rdma_ioq_t *entry,
char *buf = NULL;
uint32_t payload_size = 0;
int count = 0, i = 0;
- rdma_private_t *priv = NULL;
- rdma_device_t *device = NULL;
int32_t ret = 0;
struct iovec vector[MAX_IOVEC];
- priv = peer->trans->private;
- device = priv->device;
-
header = (rdma_header_t *)post->buf;
__rdma_fill_reply_header (header, entry->rpchdr, reply_info,
@@ -1512,11 +1497,6 @@ __rdma_send_reply_type_msg (rdma_peer_t *peer, rdma_ioq_t *entry,
int32_t send_size = 0, ret = 0;
char *ptr = NULL;
uint32_t payload_size = 0;
- rdma_private_t *priv = NULL;
- rdma_device_t *device = NULL;
-
- priv = peer->trans->private;
- device = priv->device;
send_size = iov_length (entry->rpchdr, entry->rpchdr_count)
+ iov_length (entry->proghdr, entry->proghdr_count)
@@ -4327,7 +4307,6 @@ static int
rdma_handshake_pollerr (rpc_transport_t *this)
{
rdma_private_t *priv = this->private;
- int32_t ret = 0;
char need_unref = 0, connected = 0;
gf_log (RDMA_LOG_NAME, GF_LOG_DEBUG,
@@ -4348,7 +4327,6 @@ rdma_handshake_pollerr (rpc_transport_t *this)
gf_log (RDMA_LOG_NAME, GF_LOG_ERROR,
"close () - error: %s",
strerror (errno));
- ret = -errno;
}
priv->tcp_connected = priv->connected = 0;
priv->sock = -1;
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);
{
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index f623fad9fd5..b5168605bbb 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -150,7 +150,6 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_t *inode, struct iatt *stbuf, dict_t *xattr,
struct iatt *postparent)
{
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
int this_call_cnt = 0;
call_frame_t *prev = NULL;
@@ -164,7 +163,6 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
GF_VALIDATE_OR_GOTO ("dht", this->private, out);
GF_VALIDATE_OR_GOTO ("dht", cookie, out);
- conf = this->private;
local = frame->local;
prev = cookie;
@@ -553,7 +551,6 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_t *inode, struct iatt *buf, dict_t *xattr,
struct iatt *postparent)
{
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
int this_call_cnt = 0;
call_frame_t *prev = NULL;
@@ -570,8 +567,6 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
GF_VALIDATE_OR_GOTO ("dht", cookie, out);
GF_VALIDATE_OR_GOTO ("dht", this->private, out);
- conf = this->private;
-
local = frame->local;
loc = &local->loc;
@@ -2962,13 +2957,11 @@ dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
off_t next_offset = 0;
int count = 0;
dht_layout_t *layout = 0;
- dht_conf_t *conf = NULL;
xlator_t *subvol = 0;
INIT_LIST_HEAD (&entries.list);
prev = cookie;
local = frame->local;
- conf = this->private;
if (op_ret < 0)
goto done;
@@ -3051,7 +3044,6 @@ dht_do_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t yoff, int whichop)
{
dht_local_t *local = NULL;
- dht_conf_t *conf = NULL;
int op_errno = -1;
xlator_t *xvol = NULL;
off_t xoff = 0;
@@ -3061,8 +3053,6 @@ dht_do_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (fd, err);
- conf = this->private;
-
local = dht_local_init (frame);
if (!local) {
@@ -3287,15 +3277,12 @@ dht_mknod (call_frame_t *frame, xlator_t *this,
int op_errno = -1;
int ret = -1;
xlator_t *avail_subvol = NULL;
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
VALIDATE_OR_GOTO (frame, err);
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (loc, err);
- conf = this->private;
-
dht_get_du_info (frame, this, loc);
local = dht_local_init (frame);
@@ -3499,10 +3486,8 @@ dht_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
call_frame_t *prev = NULL;
dht_layout_t *layout = NULL;
- dht_local_t *local = NULL;
prev = cookie;
- local = frame->local;
if (op_ret == -1)
goto out;
@@ -3711,7 +3696,6 @@ dht_create (call_frame_t *frame, xlator_t *this,
int op_errno = -1;
int ret = -1;
xlator_t *subvol = NULL;
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
xlator_t *avail_subvol = NULL;
@@ -3719,8 +3703,6 @@ dht_create (call_frame_t *frame, xlator_t *this,
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (loc, err);
- conf = this->private;
-
dht_get_du_info (frame, this, loc);
local = dht_local_init (frame);
@@ -3838,9 +3820,7 @@ dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int subvol_filled = 0;
call_frame_t *prev = NULL;
dht_layout_t *layout = NULL;
- dht_conf_t *conf = NULL;
- conf = this->private;
local = frame->local;
prev = cookie;
layout = local->layout;
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 745be4ce5b5..60008f2bd64 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -452,12 +452,10 @@ static int
rebalance_task (void *data)
{
int ret = -1;
- xlator_t *this = NULL;
dht_local_t *local = NULL;
call_frame_t *frame = NULL;
frame = data;
- this = THIS;
local = frame->local;
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index 538cfac952b..bdc4dd2b678 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -172,9 +172,7 @@ int
dht_rename_dir_do (call_frame_t *frame, xlator_t *this)
{
dht_local_t *local = NULL;
- dht_conf_t *conf = NULL;
- conf = this->private;
local = frame->local;
if (local->op_ret == -1)
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index ca41fd81d1b..882e0209eeb 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -786,7 +786,6 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
loc_t *loc, dht_layout_t *layout)
{
dht_local_t *local = NULL;
- uint32_t holes = 0;
uint32_t down = 0;
uint32_t misc = 0;
int ret = 0;
@@ -802,7 +801,6 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
&local->selfheal.down,
&local->selfheal.misc);
- holes = local->selfheal.hole_cnt;
down = local->selfheal.down;
misc = local->selfheal.misc;
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index e0d9849d965..6ac7a0634e2 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -2063,16 +2063,12 @@ conditional_dump (dict_t *dict, char *key, data_t *value, void *data)
const char *path;
} *stub;
xlator_t *this = NULL;
- inode_t *inode = NULL;
- const char *path = NULL;
char *filename = NULL;
FILE *logfp = NULL;
struct ios_dump_args args = {0};
stub = data;
this = stub->this;
- inode = stub->inode;
- path = stub->path;
filename = alloca (value->len + 1);
memset (filename, 0, value->len + 1);
@@ -2393,7 +2389,6 @@ mem_acct_init (xlator_t *this)
int
init (xlator_t *this)
{
- dict_t *options = NULL;
struct ios_conf *conf = NULL;
int i = 0;
char *sys_log_str = NULL;
@@ -2419,8 +2414,6 @@ init (xlator_t *this)
"dangling volume. check volfile ");
}
- options = this->options;
-
conf = GF_CALLOC (1, sizeof(*conf), gf_io_stats_mt_ios_conf);
if (!conf) {
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c
index f22ae0d748d..c3f40829b57 100644
--- a/xlators/features/locks/src/entrylk.c
+++ b/xlators/features/locks/src/entrylk.c
@@ -603,7 +603,6 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,
int32_t op_errno = 0;
void * transport = NULL;
- pid_t pid = -1;
pl_inode_t * pinode = NULL;
int ret = -1;
@@ -626,7 +625,6 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,
entrylk_trace_in (this, frame, volume, fd, loc, basename, cmd, type);
- pid = frame->root->pid;
owner = frame->root->lk_owner;
transport = frame->root->trans;
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index fc1f3a71b92..ebe205fc604 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -281,15 +281,12 @@ mark_inode_undirty (call_frame_t *frame, void *cookie, xlator_t *this,
int64_t *size = NULL;
dict_t *newdict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = (quota_local_t *) frame->local;
if (op_ret == -1)
goto err;
- priv = (marker_conf_t *) this->private;
-
if (!dict)
goto wind;
@@ -341,15 +338,12 @@ update_size_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
int64_t *size = NULL;
int64_t *delta = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
if (op_ret == -1)
goto err;
- priv = this->private;
-
if (dict == NULL) {
gf_log (this->name, GF_LOG_WARNING,
"Dict is null while updating the size xattr %s",
@@ -429,12 +423,9 @@ get_dirty_inode_size (call_frame_t *frame, xlator_t *this)
int32_t ret = -1;
dict_t *dict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = (quota_local_t *) frame->local;
- priv = (marker_conf_t *) this->private;
-
dict = dict_new ();
if (!dict) {
ret = -1;
@@ -730,7 +721,6 @@ check_if_still_dirty (call_frame_t *frame,
int32_t ret = -1;
fd_t *fd = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
@@ -740,8 +730,6 @@ check_if_still_dirty (call_frame_t *frame,
goto err;
}
- priv = this->private;
-
if (!dict) {
ret = -1;
goto err;
@@ -790,15 +778,12 @@ get_dirty_xattr (call_frame_t *frame, void *cookie,
int32_t ret = -1;
dict_t *xattr_req = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
if (op_ret == -1) {
dirty_inode_updation_done (frame, NULL, this, 0, 0);
return 0;
}
- priv = (marker_conf_t *) this->private;
-
local = frame->local;
xattr_req = dict_new ();
@@ -947,7 +932,6 @@ create_dirty_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t ret = -1;
dict_t *newdict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
if (op_ret < 0) {
goto err;
@@ -955,8 +939,6 @@ create_dirty_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
- priv = (marker_conf_t *) this->private;
-
if (local->loc.inode->ia_type == IA_IFDIR) {
newdict = dict_new ();
if (!newdict) {
@@ -999,7 +981,6 @@ quota_create_xattr (xlator_t *this, call_frame_t *frame)
dict_t *dict = NULL;
char key[512] = {0, };
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contri = NULL;
@@ -1008,8 +989,6 @@ quota_create_xattr (xlator_t *this, call_frame_t *frame)
local = frame->local;
- priv = (marker_conf_t *) this->private;
-
ret = quota_inode_ctx_get (local->loc.inode, this, &ctx);
if (ret < 0) {
ctx = quota_inode_ctx_new (local->loc.inode, this);
@@ -1081,7 +1060,6 @@ quota_check_n_set_inode_xattr (call_frame_t *frame, void *cookie,
quota_local_t *local = NULL;
int64_t *size = NULL, *contri = NULL;
int8_t dirty = 0;
- marker_conf_t *priv = NULL;
int32_t ret = 0;
char contri_key[512] = {0, };
@@ -1090,7 +1068,6 @@ quota_check_n_set_inode_xattr (call_frame_t *frame, void *cookie,
}
local = frame->local;
- priv = this->private;
ret = dict_get_bin (dict, QUOTA_SIZE_KEY, (void **) &size);
if (ret < 0)
@@ -1400,7 +1377,6 @@ quota_mark_undirty (call_frame_t *frame,
dict_t *newdict = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
@@ -1412,8 +1388,6 @@ quota_mark_undirty (call_frame_t *frame,
goto err;
}
- priv = this->private;
-
//update the size of the parent inode
if (dict != NULL) {
ret = quota_inode_ctx_get (local->parent_loc.inode, this, &ctx);
@@ -1482,7 +1456,6 @@ quota_update_parent_size (call_frame_t *frame,
int64_t *size = NULL;
int32_t ret = -1;
dict_t *newdict = NULL;
- marker_conf_t *priv = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
@@ -1506,8 +1479,6 @@ quota_update_parent_size (call_frame_t *frame,
local->loc.path, local->ctx->size,
local->contri->contribution);
- priv = this->private;
-
if (dict == NULL) {
op_errno = EINVAL;
goto err;
@@ -1571,7 +1542,6 @@ quota_update_inode_contribution (call_frame_t *frame, void *cookie,
dict_t *newdict = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
- marker_conf_t *priv = NULL;
inode_contribution_t *contribution = NULL;
local = frame->local;
@@ -1584,8 +1554,6 @@ quota_update_inode_contribution (call_frame_t *frame, void *cookie,
goto err;
}
- priv = this->private;
-
ctx = local->ctx;
contribution = local->contri;
@@ -1691,7 +1659,6 @@ quota_fetch_child_size_and_contri (call_frame_t *frame, void *cookie,
char contri_key [512] = {0, };
dict_t *newdict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
quota_inode_ctx_t *ctx = NULL;
local = frame->local;
@@ -1709,8 +1676,6 @@ quota_fetch_child_size_and_contri (call_frame_t *frame, void *cookie,
gf_log (this->name, GF_LOG_DEBUG, "%s marked dirty", local->parent_loc.path);
- priv = this->private;
-
//update parent ctx
ret = quota_inode_ctx_get (local->parent_loc.inode, this, &ctx);
if (ret == -1) {
@@ -1781,7 +1746,6 @@ quota_markdirty (call_frame_t *frame, void *cookie,
int32_t ret = -1;
dict_t *dict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
@@ -1802,8 +1766,6 @@ quota_markdirty (call_frame_t *frame, void *cookie,
gf_log (this->name, GF_LOG_TRACE,
"inodelk succeeded on %s", local->parent_loc.path);
- priv = this->private;
-
dict = dict_new ();
if (!dict) {
ret = -1;
@@ -1989,13 +1951,10 @@ inspect_directory_xattr (xlator_t *this,
int64_t *size = NULL, size_int = 0;
int64_t *contri = NULL, contri_int = 0;
char contri_key [512] = {0, };
- marker_conf_t *priv = NULL;
gf_boolean_t not_root = _gf_false;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contribution = NULL;
- priv = this->private;
-
ret = quota_inode_ctx_get (loc->inode, this, &ctx);
if (ret < 0) {
ctx = quota_inode_ctx_new (loc->inode, this);
@@ -2079,12 +2038,9 @@ inspect_file_xattr (xlator_t *this,
uint64_t contri_int = 0, size = 0;
int64_t *contri_ptr = NULL;
char contri_key [512] = {0, };
- marker_conf_t *priv = NULL;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contribution = NULL;
- priv = this->private;
-
ret = quota_inode_ctx_get (loc->inode, this, &ctx);
if (ret < 0) {
ctx = quota_inode_ctx_new (loc->inode, this);
@@ -2159,14 +2115,11 @@ quota_req_xattr (xlator_t *this,
dict_t *dict)
{
int32_t ret = -1;
- marker_conf_t *priv = NULL;
GF_VALIDATE_OR_GOTO ("marker", this, out);
GF_VALIDATE_OR_GOTO ("marker", loc, out);
GF_VALIDATE_OR_GOTO ("marker", dict, out);
- priv = this->private;
-
//if not "/" then request contribution
if (strcmp (loc->path, "/") == 0)
goto set_size;
@@ -2305,9 +2258,7 @@ mq_reduce_parent_size_xattr (call_frame_t *frame, void *cookie,
int32_t ret = -1;
int64_t *size = NULL;
dict_t *dict = NULL;
- marker_conf_t *priv = NULL;
quota_local_t *local = NULL;
- inode_contribution_t *contribution = NULL;
local = frame->local;
if (op_ret == -1) {
@@ -2319,10 +2270,6 @@ mq_reduce_parent_size_xattr (call_frame_t *frame, void *cookie,
VALIDATE_OR_GOTO (local->contri, err);
- priv = this->private;
-
- contribution = local->contri;
-
dict = dict_new ();
if (dict == NULL) {
ret = -1;
@@ -2358,7 +2305,6 @@ reduce_parent_size (xlator_t *this, loc_t *loc, int64_t contri)
int32_t ret = -1;
struct gf_flock lock = {0,};
call_frame_t *frame = NULL;
- marker_conf_t *priv = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contribution = NULL;
@@ -2366,8 +2312,6 @@ reduce_parent_size (xlator_t *this, loc_t *loc, int64_t contri)
GF_VALIDATE_OR_GOTO ("marker", this, out);
GF_VALIDATE_OR_GOTO ("marker", loc, out);
- priv = this->private;
-
ret = quota_inode_ctx_get (loc->inode, this, &ctx);
if (ret < 0)
goto out;
diff --git a/xlators/features/quiesce/src/quiesce.c b/xlators/features/quiesce/src/quiesce.c
index 7fd16ceb961..84df12a31ff 100644
--- a/xlators/features/quiesce/src/quiesce.c
+++ b/xlators/features/quiesce/src/quiesce.c
@@ -34,13 +34,9 @@
void
gf_quiesce_local_wipe (xlator_t *this, quiesce_local_t *local)
{
- quiesce_priv_t *priv = NULL;
-
if (!local || !this || !this->private)
return;
- priv = this->private;
-
if (local->loc.inode)
loc_wipe (&local->loc);
if (local->fd)
@@ -108,7 +104,6 @@ gf_quiesce_timeout (void *data)
{
xlator_t *this = NULL;
quiesce_priv_t *priv = NULL;
- int need_dequeue = 0;
this = data;
priv = this->private;
@@ -117,7 +112,6 @@ gf_quiesce_timeout (void *data)
LOCK (&priv->lock);
{
priv->pass_through = _gf_true;
- need_dequeue = (priv->queue_size)? 1:0;
}
UNLOCK (&priv->lock);
@@ -168,12 +162,9 @@ quiesce_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, dict_t *dict, struct iatt *postparent)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -202,12 +193,9 @@ int32_t
quiesce_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *buf)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -235,12 +223,9 @@ int32_t
quiesce_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -268,12 +253,9 @@ quiesce_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, const char *path,
struct iatt *buf)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -301,12 +283,9 @@ int32_t
quiesce_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -336,12 +315,9 @@ quiesce_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
int32_t count, struct iatt *stbuf, struct iobref *iobref)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -370,12 +346,9 @@ int32_t
quiesce_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -405,12 +378,9 @@ quiesce_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
struct iatt *postbuf)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -438,12 +408,9 @@ int32_t
quiesce_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *buf)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -471,12 +438,9 @@ int32_t
quiesce_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -504,12 +468,9 @@ int32_t
quiesce_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -536,12 +497,9 @@ int32_t
quiesce_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct statvfs *buf)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -569,12 +527,9 @@ int32_t
quiesce_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *dict)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -603,12 +558,9 @@ int32_t
quiesce_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *dict)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -638,12 +590,9 @@ quiesce_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, uint32_t weak_checksum,
uint8_t *strong_checksum)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -673,12 +622,9 @@ int32_t
quiesce_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, gf_dirent_t *entries)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
@@ -707,12 +653,9 @@ int32_t
quiesce_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, gf_dirent_t *entries)
{
- quiesce_priv_t *priv = NULL;
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
- priv = this->private;
-
local = frame->local;
frame->local = NULL;
if ((op_ret == -1) && (op_errno == ENOTCONN)) {
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 392717c55ce..28107033e37 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -201,7 +201,6 @@ quota_validate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
uint32_t validate_count = 0, link_count = 0;
int32_t ret = 0;
quota_inode_ctx_t *ctx = NULL;
- quota_priv_t *priv = NULL;
int64_t *size = 0;
uint64_t value = 0;
call_stub_t *stub = NULL;
@@ -213,9 +212,6 @@ quota_validate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
GF_ASSERT (local);
-
- priv = this->private;
-
GF_ASSERT (frame);
GF_VALIDATE_OR_GOTO_WITH_ERROR ("quota", this, unwind, op_errno,
EINVAL);
@@ -511,14 +507,11 @@ __quota_init_inode_ctx (inode_t *inode, int64_t limit, xlator_t *this,
int32_t ret = -1;
int64_t *size = 0;
quota_inode_ctx_t *ctx = NULL;
- quota_priv_t *priv = NULL;
if (inode == NULL) {
goto out;
}
- priv = this->private;
-
QUOTA_ALLOC_OR_GOTO (ctx, quota_inode_ctx_t, out);
ctx->limit = limit;
@@ -587,7 +580,6 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
quota_dentry_t *dentry = NULL;
- quota_priv_t *priv = NULL;
int64_t *size = 0;
uint64_t value = 0;
@@ -603,8 +595,6 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unwind;
}
- priv = this->private;
-
ret = quota_inode_ctx_get (local->loc.inode, local->limit, this, dict,
buf, &ctx, 1);
if ((ret == -1) || (ctx == NULL)) {
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index 5fbdfc11660..8b3a03b6f3e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -50,7 +50,6 @@ glusterd_handle_add_brick (rpcsvc_request_t *req)
char err_str[2048] = {0,};
gf1_cli_add_brick_rsp rsp = {0,};
glusterd_volinfo_t *volinfo = NULL;
- glusterd_conf_t *priv = NULL;
xlator_t *this = NULL;
char *free_ptr = NULL;
glusterd_brickinfo_t *tmpbrkinfo = NULL;
@@ -60,8 +59,6 @@ glusterd_handle_add_brick (rpcsvc_request_t *req)
this = THIS;
GF_ASSERT(this);
- priv = this->private;
-
GF_ASSERT (req);
INIT_LIST_HEAD (&tmpvolinfo.bricks);
@@ -450,9 +447,6 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count,
char *free_ptr2 = NULL;
char *saveptr = NULL;
int32_t ret = -1;
- glusterd_conf_t *priv = NULL;
-
- priv = THIS->private;
GF_ASSERT (volinfo);
@@ -523,14 +517,11 @@ glusterd_op_perform_remove_brick (glusterd_volinfo_t *volinfo, char *brick)
glusterd_brickinfo_t *brickinfo = NULL;
char *dup_brick = NULL;
- glusterd_conf_t *priv = NULL;
int32_t ret = -1;
GF_ASSERT (volinfo);
GF_ASSERT (brick);
- priv = THIS->private;
-
dup_brick = gf_strdup (brick);
if (!dup_brick)
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 9630546b42a..86681146bb2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -832,15 +832,12 @@ glusterd_op_verify_gsync_running (glusterd_volinfo_t *volinfo,
int ret = -1;
char msg[2048] = {0};
uuid_t uuid = {0};
- glusterd_conf_t *priv = NULL;
GF_ASSERT (THIS && THIS->private);
GF_ASSERT (volinfo);
GF_ASSERT (slave);
GF_ASSERT (op_errstr);
- priv = THIS->private;
-
if (GLUSTERD_STATUS_STARTED != volinfo->status) {
snprintf (msg, sizeof (msg), "Volume %s needs to be started "
"before "GEOREP" start", volinfo->volname);
@@ -1004,13 +1001,10 @@ stop_gsync (char *master, char *slave, char **msg)
char pidfile[PATH_MAX] = {0,};
char buf [1024] = {0,};
int i = 0;
- glusterd_conf_t *priv = NULL;
GF_ASSERT (THIS);
GF_ASSERT (THIS->private);
- priv = THIS->private;
-
pfd = gsyncd_getpidfile (master, slave, pidfile);
if (pfd == -2) {
gf_log ("", GF_LOG_ERROR, GEOREP" stop validation "
@@ -1310,13 +1304,10 @@ glusterd_set_marker_gsync (glusterd_volinfo_t *volinfo)
int ret = -1;
int marker_set = _gf_false;
char *gsync_status = NULL;
- glusterd_conf_t *priv = NULL;
GF_ASSERT (THIS);
GF_ASSERT (THIS->private);
- priv = THIS->private;
-
marker_set = glusterd_volinfo_get_boolean (volinfo, VKEY_MARKER_XTIME);
if (marker_set == -1) {
gf_log ("", GF_LOG_ERROR, "failed to get the marker status");
diff --git a/xlators/mgmt/glusterd/src/glusterd-log-ops.c b/xlators/mgmt/glusterd/src/glusterd-log-ops.c
index 7274d102418..77275ca95a1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-log-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-log-ops.c
@@ -89,7 +89,6 @@ glusterd_handle_log_locate (rpcsvc_request_t *req)
int32_t ret = -1;
gf1_cli_log_locate_req cli_req = {0,};
gf1_cli_log_locate_rsp rsp = {0,};
- glusterd_conf_t *priv = NULL;
glusterd_volinfo_t *volinfo = NULL;
glusterd_brickinfo_t *brickinfo = NULL;
char tmp_str[PATH_MAX] = {0,};
@@ -99,8 +98,6 @@ glusterd_handle_log_locate (rpcsvc_request_t *req)
GF_ASSERT (req);
- priv = THIS->private;
-
if (!xdr_to_generic (req->msg[0], &cli_req,
(xdrproc_t)xdr_gf1_cli_log_locate_req)) {
//failed to decode msg;
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 7fe68ded0b3..44298d6637a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1922,14 +1922,12 @@ glusterd_op_brick_disconnect (void *data)
static int
glusterd_op_ac_rcvd_commit_op_acc (glusterd_op_sm_event_t *event, void *ctx)
{
- glusterd_conf_t *priv = NULL;
dict_t *dict = NULL;
int ret = 0;
gf_boolean_t commit_ack_inject = _gf_true;
glusterd_op_t op = GD_OP_NONE;
op = glusterd_op_get_op ();
- priv = THIS->private;
GF_ASSERT (event);
if (opinfo.pending_count > 0)
@@ -2800,7 +2798,6 @@ glusterd_op_ac_rcvd_brick_op_acc (glusterd_op_sm_event_t *event, void *ctx)
char *op_errstr = NULL;
glusterd_op_t op = GD_OP_NONE;
dict_t *op_ctx = NULL;
- gf_boolean_t free_errstr = _gf_true;
glusterd_req_ctx_t *req_ctx = NULL;
GF_ASSERT (event);
@@ -2818,7 +2815,6 @@ glusterd_op_ac_rcvd_brick_op_acc (glusterd_op_sm_event_t *event, void *ctx)
gf_log ("glusterd", GF_LOG_ERROR, "unknown response received "
"from %s:%s", brickinfo->hostname, brickinfo->path);
ret = -1;
- free_errstr = _gf_true;
goto out;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 68cbab54b62..3cfa04bdd32 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -569,11 +569,9 @@ glusterd_handle_defrag_volume_v2 (rpcsvc_request_t *req)
glusterd_volinfo_t *volinfo = NULL;
gf2_cli_defrag_vol_rsp rsp = {0,};
char msg[2048] = {0};
- glusterd_conf_t *priv = NULL;
GF_ASSERT (req);
- priv = THIS->private;
if (!xdr_to_generic (req->msg[0], &cli_req,
(xdrproc_t)xdr_gf1_cli_defrag_vol_req)) {
//failed to decode msg;
@@ -628,7 +626,6 @@ glusterd_handle_defrag_volume (rpcsvc_request_t *req)
{
int32_t ret = -1;
gf1_cli_defrag_vol_req cli_req = {0,};
- glusterd_conf_t *priv = NULL;
char cmd_str[4096] = {0,};
glusterd_volinfo_t *volinfo = NULL;
gf1_cli_defrag_vol_rsp rsp = {0,};
@@ -636,8 +633,6 @@ glusterd_handle_defrag_volume (rpcsvc_request_t *req)
GF_ASSERT (req);
- priv = THIS->private;
-
if (!xdr_to_generic (req->msg[0], &cli_req,
(xdrproc_t)xdr_gf1_cli_defrag_vol_req)) {
//failed to decode msg;
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index f8f0e8a844d..f84dae17484 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -1449,9 +1449,6 @@ glusterd_op_perform_replace_brick (glusterd_volinfo_t *volinfo,
glusterd_brickinfo_t *old_brickinfo = NULL;
glusterd_brickinfo_t *new_brickinfo = NULL;
int32_t ret = -1;
- glusterd_conf_t *priv = NULL;
-
- priv = THIS->private;
GF_ASSERT (volinfo);
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index 06dff923bf8..06cbdd7935d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -431,14 +431,11 @@ glusterd3_1_probe_cbk (struct rpc_req *req, struct iovec *iov,
int count, void *myframe)
{
gd1_mgmt_probe_rsp rsp = {{0},};
- glusterd_conf_t *conf = NULL;
int ret = 0;
glusterd_peerinfo_t *peerinfo = NULL;
glusterd_friend_sm_event_t *event = NULL;
glusterd_probe_ctx_t *ctx = NULL;
- conf = THIS->private;
-
if (-1 == req->rpc_status) {
goto out;
}
@@ -512,7 +509,6 @@ glusterd3_1_friend_add_cbk (struct rpc_req * req, struct iovec *iov,
int count, void *myframe)
{
gd1_mgmt_friend_rsp rsp = {{0},};
- glusterd_conf_t *conf = NULL;
int ret = -1;
glusterd_friend_sm_event_t *event = NULL;
glusterd_friend_sm_event_type_t event_type = GD_FRIEND_EVENT_NONE;
@@ -522,8 +518,6 @@ glusterd3_1_friend_add_cbk (struct rpc_req * req, struct iovec *iov,
glusterd_probe_ctx_t *ctx = NULL;
glusterd_friend_update_ctx_t *ev_ctx = NULL;
- conf = THIS->private;
-
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
@@ -699,7 +693,6 @@ int32_t
glusterd3_1_friend_update_cbk (struct rpc_req *req, struct iovec *iov,
int count, void *myframe)
{
- gd1_mgmt_cluster_lock_rsp rsp = {{0},};
int ret = -1;
int32_t op_ret = 0;
char str[50] = {0,};
@@ -707,22 +700,9 @@ glusterd3_1_friend_update_cbk (struct rpc_req *req, struct iovec *iov,
GF_ASSERT (req);
if (-1 == req->rpc_status) {
- rsp.op_ret = -1;
- rsp.op_errno = EINVAL;
goto out;
}
-/* ret = xdr_to_generic (*iov, &rsp, (xdrproc_t)xdr_gd1_mgmt_friend_update_rsp);
- if (ret < 0) {
- gf_log ("", GF_LOG_ERROR, "error");
- rsp.op_ret = -1;
- rsp.op_errno = EINVAL;
- goto out;
- }
- uuid_unparse (rsp.uuid, str);
-
- op_ret = rsp.op_ret;
-*/
gf_log ("glusterd", GF_LOG_INFO,
"Received %s from uuid: %s",
(op_ret)?"RJT":"ACC", str);
@@ -1475,7 +1455,6 @@ glusterd3_1_friend_add (call_frame_t *frame, xlator_t *this,
glusterd_peerinfo_t *peerinfo = NULL;
glusterd_conf_t *priv = NULL;
glusterd_friend_sm_event_t *event = NULL;
- glusterd_friend_req_ctx_t *ctx = NULL;
dict_t *vols = NULL;
@@ -1489,8 +1468,6 @@ glusterd3_1_friend_add (call_frame_t *frame, xlator_t *this,
GF_ASSERT (priv);
- ctx = event->ctx;
-
peerinfo = event->peerinfo;
ret = glusterd_build_volume_dict (&vols);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index d7b28ba1e84..90d3f16bc45 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -52,7 +52,6 @@ glusterd_handle_create_volume (rpcsvc_request_t *req)
void *cli_rsp = NULL;
char err_str[2048] = {0,};
gf1_cli_create_vol_rsp rsp = {0,};
- glusterd_conf_t *priv = NULL;
xlator_t *this = NULL;
char *free_ptr = NULL;
char *trans_type = NULL;
@@ -67,8 +66,6 @@ glusterd_handle_create_volume (rpcsvc_request_t *req)
this = THIS;
GF_ASSERT(this);
- priv = this->private;
-
ret = -1;
if (!xdr_to_generic (req->msg[0], &cli_req,
(xdrproc_t)xdr_gf1_cli_create_vol_req)) {
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 5a39c30899d..699c03c4b12 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -297,10 +297,6 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args);
}
#define GLUSTERD_STACK_DESTROY(frame) do {\
- void *__local = NULL; \
- xlator_t *__xl = NULL; \
- __xl = frame->this; \
- __local = frame->local; \
frame->local = NULL; \
STACK_DESTROY (frame->root);\
} while (0)
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index 39e10e8a2ab..89ed790aab0 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -388,13 +388,11 @@ out:
int
fuse_resolve_entry_simple (fuse_state_t *state)
{
- xlator_t *this = NULL;
fuse_resolve_t *resolve = NULL;
inode_t *parent = NULL;
inode_t *inode = NULL;
int ret = 0;
- this = state->this;
resolve = state->resolve_now;
parent = inode_find (state->itable, resolve->pargfid);
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index 0c3f10cb2bf..30005846b41 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -813,7 +813,6 @@ mnt3_find_export (rpcsvc_request_t *req, char *path, struct mnt3_export **e)
int ret = -EFAULT;
struct mount3_state *ms = NULL;
struct mnt3_export *exp = NULL;
- struct nfs_state *nfs = NULL;
if ((!req) || (!path) || (!e))
return -1;
@@ -825,7 +824,6 @@ mnt3_find_export (rpcsvc_request_t *req, char *path, struct mnt3_export **e)
goto err;
}
- nfs = (struct nfs_state *)ms->nfsx->private;
gf_log (GF_MNT, GF_LOG_DEBUG, "dirpath: %s", path);
exp = mnt3_mntpath_to_export (ms, path);
if (exp) {
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c
index 236c411e2e2..95a657a1280 100644
--- a/xlators/nfs/server/src/nfs-fops.c
+++ b/xlators/nfs/server/src/nfs-fops.c
@@ -52,13 +52,9 @@ nfs_fop_local_init (xlator_t *nfsx)
void
nfs_fop_local_wipe (xlator_t *nfsx, struct nfs_fop_local *l)
{
- struct nfs_state *nfs = NULL;
-
if ((!nfsx) || (!l))
return;
- nfs = nfsx->private;
-
if (l->iobref)
iobref_unref (l->iobref);
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index 80bb9cebec3..9c942e1af1b 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -750,10 +750,8 @@ err:
int
notify (xlator_t *this, int32_t event, void *data, ...)
{
- struct nfs_state *nfs = NULL;
xlator_t *subvol = NULL;
- nfs = (struct nfs_state *)this->private;
subvol = (xlator_t *)data;
gf_log (GF_NFS, GF_LOG_TRACE, "Notification received: %d",
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 013f6d80ede..9a71937861d 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -402,11 +402,9 @@ nfs3_call_state_init (struct nfs3_state *s, rpcsvc_request_t *req, xlator_t *v)
void
nfs3_call_state_wipe (nfs3_call_state_t *cs)
{
- struct nfs3_state *nfs3 = NULL;
if (!cs)
return;
- nfs3 = cs->nfs3state;
if (cs->fd) {
gf_log (GF_NFS3, GF_LOG_TRACE, "fd 0x%lx ref: %d",
(long)cs->fd, cs->fd->refcount);
@@ -1400,9 +1398,7 @@ int
nfs3_access_reply (rpcsvc_request_t *req, nfsstat3 status, int32_t accbits)
{
access3res res;
- uint64_t deviceid = 0;
- deviceid = nfs3_request_xlator_deviceid (req);
nfs3_fill_access3res (&res, status, accbits);
nfs3svc_submit_reply (req, &res,
(nfs3_serializer)xdr_serialize_access3res);
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 361c90d7eb2..4d47eb54ebe 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -2903,7 +2903,6 @@ out:
int32_t
init (xlator_t *this)
{
- dict_t *options = NULL;
wb_conf_t *conf = NULL;
int32_t ret = -1;
@@ -2920,8 +2919,6 @@ init (xlator_t *this)
"dangling volume. check volfile");
}
- options = this->options;
-
conf = GF_CALLOC (1, sizeof (*conf), gf_wb_mt_wb_conf_t);
if (conf == NULL) {
goto out;
diff --git a/xlators/protocol/client/src/client-lk.c b/xlators/protocol/client/src/client-lk.c
index 8e78e5410f7..31c56a05f5b 100644
--- a/xlators/protocol/client/src/client-lk.c
+++ b/xlators/protocol/client/src/client-lk.c
@@ -490,10 +490,7 @@ new_client_lock (struct gf_flock *flock, uint64_t owner,
int32_t cmd, fd_t *fd)
{
client_posix_lock_t *new_lock = NULL;
- xlator_t *this = NULL;
-
- this = THIS;
new_lock = GF_CALLOC (1, sizeof (*new_lock),
gf_client_mt_clnt_lock_t);
if (!new_lock) {
@@ -668,9 +665,7 @@ client_remove_reserve_lock (xlator_t *this, call_frame_t *frame,
client_posix_lock_t *lock)
{
struct gf_flock unlock;
- clnt_local_t *local = NULL;
- local = frame->local;
construct_reserve_unlock (&unlock, frame, lock);
STACK_WIND (frame, client_remove_reserve_lock_cbk,
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 971cd08b074..c7064438352 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -1075,7 +1075,6 @@ out:
static gf_boolean_t
client_set_remote_options (char *value, xlator_t *this)
{
- clnt_conf_t *conf = NULL;
char *dup_value = NULL;
char *host = NULL;
char *subvol = NULL;
@@ -1086,8 +1085,6 @@ client_set_remote_options (char *value, xlator_t *this)
int remote_port = 0;
gf_boolean_t ret = _gf_false;
- conf = this->private;
-
dup_value = gf_strdup (value);
host = strtok_r (dup_value, ":", &tmp);
subvol = strtok_r (NULL, ":", &tmp);
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
index edad73dba7b..ca7784bad5a 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -261,9 +261,7 @@ server_getspec (rpcsvc_request_t *req)
xlator_t *this = NULL;
gf_getspec_req args = {0,};
gf_getspec_rsp rsp = {0,};
- server_connection_t *conn = NULL;
- conn = req->trans->private;
this = req->svc->mydata;
conf = this->private;
if (!xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gf_getspec_req)) {
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index d14ff6b2a75..5fe6edfd96d 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -230,13 +230,10 @@ posix_fill_ino_from_gfid (xlator_t *this, struct iatt *buf)
int
posix_lstat_with_gfid (xlator_t *this, const char *path, struct iatt *stbuf_p)
{
- struct posix_private *priv = NULL;
int ret = 0;
struct stat lstatbuf = {0, };
struct iatt stbuf = {0, };
- priv = this->private;
-
ret = lstat (path, &lstatbuf);
if (ret == -1)
goto out;
@@ -259,13 +256,10 @@ out:
int
posix_fstat_with_gfid (xlator_t *this, int fd, struct iatt *stbuf_p)
{
- struct posix_private *priv = NULL;
int ret = 0;
struct stat fstatbuf = {0, };
struct iatt stbuf = {0, };
- priv = this->private;
-
ret = fstat (fd, &fstatbuf);
if (ret == -1)
goto out;
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index f816128f4cf..49a874b6dc2 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1837,7 +1837,6 @@ posix_open (call_frame_t *frame, xlator_t *this,
int32_t _fd = -1;
struct posix_fd *pfd = NULL;
struct posix_private *priv = NULL;
- char was_present = 1;
gid_t gid = 0;
struct iatt stbuf = {0, };
@@ -1867,9 +1866,6 @@ posix_open (call_frame_t *frame, xlator_t *this,
flags |= O_DIRECT;
op_ret = posix_lstat_with_gfid (this, real_path, &stbuf);
- if ((op_ret == -1) && (errno == ENOENT)) {
- was_present = 0;
- }
_fd = open (real_path, flags, 0);
if (_fd == -1) {
@@ -1959,7 +1955,6 @@ posix_readv (call_frame_t *frame, xlator_t *this,
struct iovec vec = {0,};
struct posix_fd * pfd = NULL;
struct iatt stbuf = {0,};
- int align = 1;
int ret = -1;
VALIDATE_OR_GOTO (frame, out);
@@ -1985,10 +1980,6 @@ posix_readv (call_frame_t *frame, xlator_t *this,
goto out;
}
- if (pfd->flags & O_DIRECT) {
- align = 4096; /* align to page boundary */
- }
-
iobuf = iobuf_get2 (this->ctx->iobuf_pool, size);
if (!iobuf) {
op_errno = ENOMEM;
@@ -2281,7 +2272,6 @@ posix_flush (call_frame_t *frame, xlator_t *this,
{
int32_t op_ret = -1;
int32_t op_errno = 0;
- struct posix_fd * pfd = NULL;
int ret = -1;
uint64_t tmp_pfd = 0;
@@ -2296,7 +2286,6 @@ posix_flush (call_frame_t *frame, xlator_t *this,
"pfd is NULL on fd=%p", fd);
goto out;
}
- pfd = (struct posix_fd *)(long)tmp_pfd;
op_ret = 0;
@@ -2879,7 +2868,6 @@ posix_fsyncdir (call_frame_t *frame, xlator_t *this,
{
int32_t op_ret = -1;
int32_t op_errno = 0;
- struct posix_fd * pfd = NULL;
int ret = -1;
uint64_t tmp_pfd = 0;
@@ -2894,7 +2882,6 @@ posix_fsyncdir (call_frame_t *frame, xlator_t *this,
"pfd is NULL, fd=%p", fd);
goto out;
}
- pfd = (struct posix_fd *)(long)tmp_pfd;
op_ret = 0;
@@ -3501,7 +3488,6 @@ posix_do_readdir (call_frame_t *frame, xlator_t *this,
int real_path_len = -1;
char *entry_path = NULL;
int entry_path_len = -1;
- struct posix_private *priv = NULL;
struct iatt stbuf = {0, };
char base_path[PATH_MAX] = {0,};
gf_dirent_t *tmp_entry = NULL;
@@ -3513,8 +3499,6 @@ posix_do_readdir (call_frame_t *frame, xlator_t *this,
INIT_LIST_HEAD (&entries.list);
- priv = this->private;
-
ret = fd_ctx_get (fd, this, &tmp_pfd);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index 8648485cf79..d695f6200e1 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -362,11 +362,8 @@ posix_acl_ref (xlator_t *this, struct posix_acl *acl)
struct posix_acl *
posix_acl_dup (xlator_t *this, struct posix_acl *acl)
{
- struct posix_acl_conf *conf = NULL;
struct posix_acl *dup = NULL;
- conf = this->private;
-
dup = posix_acl_new (this, acl->count);
if (!dup)
return NULL;