From 2a860f422b24c2183f74a8b0e224671cea730902 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Thu, 14 Jan 2016 17:25:45 -0500 Subject: [PATCH] librgw: fix timestamp on create (another case) In the rgw_create regular file case, the timestamp and size update logic (though present) was being bypassed because the "FLAG_CREATE" indicator which formerly propagated up from RGWLibFS::lookup_fh was lost in the LRU change, which refactored the code for creating new RGWFileHandle objects. Signed-off-by: Matt Benjamin --- src/rgw/rgw_file.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index db928fbb84920..f1a4265b922c6 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -703,6 +703,7 @@ namespace rgw { cohort::lru::FLAG_INITIAL)); if (fh) { fh_cache.insert_latched(fh, lat, RGWFileHandle::FHCache::FLAG_UNLOCK); + get<1>(fhr) |= RGWFileHandle::FLAG_CREATE; goto out; /* !LATCHED */ } else { lat.lock->unlock(); -- 2.39.5