diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-01-22 12:57:10 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-01-27 08:44:00 -0800 |
commit | c0419befa9d0d470a921863cd700d778ce5da194 (patch) | |
tree | 1e9558dbdab37f90be9cc58f7b7c82fd176f38a3 | |
parent | c86141fe33239393ee2a753d65151c7c1b3ed1cc (diff) |
performance/md-cache: Initialise local->loc before winding nameless lookup
Backport of: http://review.gluster.org/9476
That way, in the cbk, the latest values are updated in the cache.
Change-Id: I3f8701d7043f06f512364e20c4456f254776cba7
BUG: 1186121
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/9497
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index ef156e309a1..e23bef02746 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -800,15 +800,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; |