]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix the wrong return value 10822/head
authorYan Jun <yan.jun8@zte.com.cn>
Tue, 23 Aug 2016 04:51:10 +0000 (12:51 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Tue, 23 Aug 2016 04:51:10 +0000 (12:51 +0800)
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>
src/rgw/rgw_file.cc

index f1f4a4b1764f94a3758b049d643cd998b63f9f3b..1cda63b4c191c6208dbe3bcd8a97c64d01354a41 100644 (file)
@@ -1366,7 +1366,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;
 }
 
 /*