summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-12-02 12:19:07 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-02 11:00:07 -0800
commit496ff502e2b00b37051c1319885ff495475196fc (patch)
treebc50a43e7ac1d9b1fa55a0f220ede70ea09b3f1f
parent85b587f07c754bd2399fb227c6ea79509502d38c (diff)
performance/stat-prefetch: get inode context from local->loc.inode instead of inode passed as arguement in sp_lookup_cbk.
- @inode in sp_lookup_cbk may be NULL in case of failure of lookup. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 426 (stat on mount point hangs.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=426
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index a9934bb1544..6ac77dd8c0e 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -693,7 +693,13 @@ sp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (local == NULL) {
op_ret = -1;
op_errno = EINVAL;
- } else if (op_ret == -1) {
+ gf_log (this->name, GF_LOG_DEBUG, "local is NULL, but it is "
+ "needed to find and resume operations waiting on "
+ "lookup");
+ goto out;
+ }
+
+ if (op_ret == -1) {
cache = sp_get_cache_inode (this, local->loc.parent,
frame->root->pid);
@@ -704,11 +710,11 @@ sp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
}
- if (local && local->is_lookup) {
+ if (local->is_lookup) {
need_unwind = 1;
}
- ret = inode_ctx_get (inode, this, &value);
+ ret = inode_ctx_get (local->loc.inode, this, &value);
if (ret == 0) {
inode_ctx = (sp_inode_ctx_t *)(long)value;
if (inode_ctx == NULL) {