From 304cfeea0106ee7a9e1786637bab403f72c96155 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 22 Jan 2015 12:57:10 +0530 Subject: performance/md-cache: Initialise local->loc before winding nameless lookup That way, in the cbk, the latest values are updated in the cache. Change-Id: Ia149e352e4763e8f5b910a3f4cb64d2dda4534b1 BUG: 1179169 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/9476 Tested-by: Gluster Build System Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- xlators/performance/md-cache/src/md-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/performance') diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index a890accbb34..68703db1195 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -824,15 +824,15 @@ mdc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, if (!local) goto uncached; + loc_copy (&local->loc, loc); + if (!loc->name) - /* A nameless discovery is dangerous to cache. We + /* A nameless discovery is dangerous to serve from cache. We perform nameless lookup with the intention of re-establishing an inode "properly" */ goto uncached; - loc_copy (&local->loc, loc); - ret = mdc_inode_iatt_get (this, loc->inode, &stbuf); if (ret != 0) goto uncached; -- cgit