summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-05-31 22:43:57 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-01 00:24:05 -0700
commitf6ac7f6f6e28c7567e05c701f88fbdd6a971bf29 (patch)
treec67cf3c0f2051cc73ad815c05fe2ecc126b81c3a /xlators
parent5b0d583cc4399e6d1b6d79ea9513c9f8ca789f8f (diff)
cluster/afr: Check before accessing xattrs in data self heal.
The lookup xattrs might be null, because a lookup might not have been issued during self heal, especially if only data self heal is required. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 815 (quick-read and replicate self-heal interaction result in empty reads) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=815 BUG: 815 (quick-read and replicate self-heal interaction result in empty reads) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=815
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index e29c1deff4b..366cac81721 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -741,7 +741,8 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
*/
dict_unref (orig_local->cont.lookup.xattr);
- orig_local->cont.lookup.xattr = dict_ref (orig_local->cont.lookup.xattrs[sh->source]);
+ if (orig_local->cont.lookup.xattrs)
+ orig_local->cont.lookup.xattr = dict_ref (orig_local->cont.lookup.xattrs[sh->source]);
if (sh->background) {
sh->unwind (sh->orig_frame, this);