]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: merge setting flags operation together
authorYan Jun <yan.jun8@zte.com.cn>
Fri, 8 Jul 2016 08:16:55 +0000 (16:16 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Fri, 8 Jul 2016 08:16:55 +0000 (16:16 +0800)
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
src/rgw/rgw_cache.h

index 5fc322634011bca53ad08c2c99554825df8f1f92..f04ced9948bd979ac9372dcb2b4ea64d324019b1 100644 (file)
@@ -396,9 +396,8 @@ int RGWCache<T>::put_system_obj_impl(rgw_obj& obj, uint64_t size, real_time *mti
   ObjectCacheInfo info;
   info.xattrs = attrs;
   info.status = 0;
-  info.flags = CACHE_FLAG_XATTRS;
   info.data = data;
-  info.flags |= CACHE_FLAG_DATA | CACHE_FLAG_META;
+  info.flags = CACHE_FLAG_XATTRS | CACHE_FLAG_DATA | CACHE_FLAG_META;
   if (objv_tracker) {
     info.version = objv_tracker->write_version;
     info.flags |= CACHE_FLAG_OBJV;
@@ -418,7 +417,7 @@ int RGWCache<T>::put_system_obj_impl(rgw_obj& obj, uint64_t size, real_time *mti
     if (r < 0)
       mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
   } else {
-   cache.remove(name);
+    cache.remove(name);
   }
 
   return ret;