diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-05-21 14:21:31 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-06-04 07:49:26 -0700 |
commit | a72e77f7bc5abfa739f19f6d02e7cf94b138c477 (patch) | |
tree | b6e83b14c56862370cc51c938339bb3b93abe9fb /xlators/cluster | |
parent | 3f5e575a0744488b4a1719c3e61864c3abc9ac22 (diff) |
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 <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5055
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, |