summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2012-03-23 16:44:38 -0400
committerAnand Avati <avati@redhat.com>2012-06-05 10:43:34 -0700
commit0baa65b651036ada96d9fc190232e4f100dc12e8 (patch)
treebe3b9f395558577d0f3f9f9db124e3517af07e4f /xlators/protocol
parent4ffd6292486f42628e1e9e01e3267daadc86698a (diff)
replicate: default read_child to a local brick if there is one.
Controlled by the "choose-local" option (on by default). Change-Id: I560f27c81703f2c9c62fdb51532c8eb763826df7 BUG: 806462 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3005 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 266f84a1dfb..d44eb86c46c 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -4688,7 +4688,7 @@ client3_1_getxattr (call_frame_t *frame, xlator_t *this,
}
args = data;
- if (!(args->loc && args->loc->inode)) {
+ if (!args->loc) {
op_errno = EINVAL;
goto unwind;
}
@@ -4729,7 +4729,7 @@ client3_1_getxattr (call_frame_t *frame, xlator_t *this,
rsp_iobuf = NULL;
rsp_iobref = NULL;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (args->loc->inode && !uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);