summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-11-30 15:48:08 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-01 05:45:44 -0800
commitcff970c45034f917a76182bc0a326d59f2cebd40 (patch)
tree64393a3ced75b5000417e492f3f468cae0cd4b4c /xlators/performance
parent2a3adcfe5c8d649a17b2d30f3715f26794dff6bb (diff)
performance/stat-prefetch: fix errors in handling memory allocation failures in sp_inode_ctx_process.
- the variables that are used for making decisions are assigned before memory allocations and these variables were not reset to correct values in case of memory allocation failures. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 9a80f50781a..59ad7d83567 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -109,9 +109,6 @@ sp_process_inode_ctx (call_frame_t *frame, xlator_t *this, loc_t *loc,
}
if (!(inode_ctx->looked_up || inode_ctx->lookup_in_progress)) {
- *need_lookup = 1;
- inode_ctx->lookup_in_progress = 1;
-
if (frame->local == NULL) {
local = CALLOC (1, sizeof (*local));
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name,
@@ -130,6 +127,9 @@ sp_process_inode_ctx (call_frame_t *frame, xlator_t *this, loc_t *loc,
goto unlock;
}
}
+
+ *need_lookup = 1;
+ inode_ctx->lookup_in_progress = 1;
}
if (inode_ctx->looked_up) {