diff --git a/src/rgw/driver/sfs/writer.cc b/src/rgw/driver/sfs/writer.cc index f0058bbcbe7456..c63e81684276bd 100644 --- a/src/rgw/driver/sfs/writer.cc +++ b/src/rgw/driver/sfs/writer.cc @@ -332,9 +332,7 @@ int SFSAtomicWriter::complete( bucketref->get_info().obj_lock.get_lock_until_date(now); string mode = bucketref->get_info().obj_lock.get_mode(); RGWObjectRetention obj_retention(mode, lock_until_date); - bufferlist bl; - obj_retention.encode(bl); - attrs[RGW_ATTR_OBJECT_RETENTION] = bl; + encode(obj_retention, attrs[RGW_ATTR_OBJECT_RETENTION]); } }