From 0baa65b651036ada96d9fc190232e4f100dc12e8 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Fri, 23 Mar 2012 16:44:38 -0400 Subject: 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 Reviewed-on: http://review.gluster.com/3005 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/protocol/client/src/client3_1-fops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 266f84a1d..d44eb86c4 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); -- cgit