From a72e77f7bc5abfa739f19f6d02e7cf94b138c477 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 21 May 2013 14:21:31 +0530 Subject: cluster/dht: Set layout when inode is present Problem: Lookups in discovery fail with ENOENT so local->inode is never set. dht_layout_set logs the callstack when the function is called in that state. Fix: Don't set layout when lookups fail in discovery. Change-Id: I5d588314c89e3575fcf7796d57847e35fd20f89a BUG: 965434 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/5055 Reviewed-by: Shishir Gowda Tested-by: Gluster Build System --- xlators/cluster/dht/src/dht-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index fbde47df6..2dbcd756d 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -208,7 +208,8 @@ dht_discover_complete (xlator_t *this, call_frame_t *discover_frame) "(overlaps/holes present)", local->loc.path); } - dht_layout_set (this, local->inode, layout); + if (local->inode) + dht_layout_set (this, local->inode, layout); } DHT_STACK_UNWIND (lookup, main_frame, local->op_ret, local->op_errno, -- cgit