]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix the wrong return value
authorYan Jun <yan.jun8@zte.com.cn>
Tue, 23 Aug 2016 04:51:10 +0000 (12:51 +0800)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 5 Oct 2016 18:25:37 +0000 (14:25 -0400)
Here `parent->readdir` will return negative numbers When there is an error.
so we should just return it.

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
(cherry picked from commit c979be7810793534715c24c6a9f7c8b0ed31de8d)

Fixes: http://tracker.ceph.com/issues/17325
src/rgw/rgw_file.cc

index 1f5b35deb7534eece6604637a18ece52432edc0c..e5a72525e423c15f7ae28a603afe63905b3cc064 100644 (file)
@@ -1400,7 +1400,7 @@ int rgw_readdir(struct rgw_fs *rgw_fs,
     return -EINVAL;
   }
   int rc = parent->readdir(rcb, cb_arg, offset, eof, flags);
-  return -rc;
+  return rc;
 }
 
 /*