diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-10-11 15:17:18 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-12 00:11:07 -0700 |
commit | 2478d21c8d7c0e4d66990f7da7323f2c750a9d82 (patch) | |
tree | 2b78081be88a53cca6c7200e0cc29de3a5604fce /xlators/cluster/dht/src/dht-common.c | |
parent | f182151cf338cad36d1d503f33b65ca40785b797 (diff) |
unwind if layout is NULL in getxattr for dht
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1917 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1917
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 3d6b0422fdb..9caa3dc5b93 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1841,6 +1841,13 @@ dht_getxattr (call_frame_t *frame, xlator_t *this, conf = this->private; layout = dht_layout_get (this, loc->inode); + if (!layout) { + gf_log (this->name, GF_LOG_ERROR, + "layout is NULL"); + op_errno = ENOENT; + goto err; + } + if (key && (strcmp (key, GF_XATTR_PATHINFO_KEY) == 0)) { hashed_subvol = dht_subvol_get_hashed (this, loc); cached_subvol = dht_subvol_get_cached (this, loc->inode); |