]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: transitio days can be zero in transition check 37465/head
authorzhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Fri, 18 Oct 2019 01:17:32 +0000 (09:17 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 29 Sep 2020 16:05:03 +0000 (18:05 +0200)
Signed-off-by: zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
(cherry picked from commit 191fc25a97cb748f1105a463e9772194ba724d97)

src/rgw/rgw_lc.cc

index 9dd29627db98ce84f6615d5642139ce69f755729..9d4097666f8533888b07e0261b5bebfec0528a50 100644 (file)
@@ -857,7 +857,7 @@ public:
 
     auto mtime = get_effective_mtime(oc);
     bool is_expired;
-    if (transition.days <= 0) {
+    if (transition.days < 0) {
       if (transition.date == boost::none) {
         ldout(oc.cct, 20) << __func__ << "(): key=" << o.key << ": no transition day/date set in rule, skipping" << dendl;
         return false;