diff options
author | Mohammed Junaid Ahmed <junaid@gluster.com> | 2011-03-28 04:04:55 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-29 04:14:39 -0700 |
commit | 61b669c8366bc43e62324bbd0ce381cdbe633b93 (patch) | |
tree | 4e297e3057c47280103ab48e828bb648dd055f23 /xlators | |
parent | b65f54c9aa1e3405b731769e56460592ba69ed60 (diff) |
features/marker: check for op_ret before doing any operations in lookup callback
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2497 (client crashes)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2497
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/marker/src/marker.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 3a43ffdf4..43bb58cd8 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1580,7 +1580,6 @@ marker_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, dict_t *dict, struct iatt *postparent) { - struct iatt stat_buf; marker_conf_t *priv = NULL; marker_local_t *local = NULL; @@ -1589,12 +1588,6 @@ marker_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, strerror (op_errno)); } - priv = this->private; - - dict_ref (dict); - - memmove (&stat_buf, buf, sizeof (struct iatt)); - local = (marker_local_t *) frame->local; frame->local = NULL; @@ -1605,15 +1598,15 @@ marker_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret == -1 || local == NULL) goto out; + priv = this->private; + if (priv->feature_enabled & GF_QUOTA) { - quota_xattr_state (this, &local->loc, dict, stat_buf); + quota_xattr_state (this, &local->loc, dict, *buf); } out: marker_local_unref (local); - dict_unref (dict); - return 0; } |