summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-inode-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 587e4840008..5a2c40cc467 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -291,14 +291,9 @@ afr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
fd_ctx = (afr_fd_ctx_t *)(long) ctx;
- if (fd_ctx->down_count < priv->down_count) {
- local->up_down_flush_cbk = afr_do_writev;
- afr_up_down_flush (frame, this, fd, AFR_CHILD_DOWN_FLUSH);
-
- } else if (fd_ctx->up_count < priv->up_count) {
- local->up_down_flush_cbk = afr_do_writev;
- afr_up_down_flush (frame, this, fd, AFR_CHILD_UP_FLUSH);
-
+ if (fd_ctx->up_count < priv->up_count) {
+ local->openfd_flush_cbk = afr_do_writev;
+ afr_openfd_flush (frame, this, fd);
} else {
afr_do_writev (frame, this);
}
@@ -769,9 +764,9 @@ afr_ftruncate (call_frame_t *frame, xlator_t *this,
fd_ctx = (afr_fd_ctx_t *)(long) ctx;
- if (fd_ctx->down_count < priv->down_count) {
- local->up_down_flush_cbk = afr_do_ftruncate;
- afr_up_down_flush (frame, this, fd, AFR_CHILD_DOWN_FLUSH);
+ if (fd_ctx->up_count < priv->up_count) {
+ local->openfd_flush_cbk = afr_do_ftruncate;
+ afr_openfd_flush (frame, this, fd);
} else {
afr_do_ftruncate (frame, this);
}