]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: fix reversed return value of getattr 13895/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Wed, 8 Mar 2017 08:23:11 +0000 (16:23 +0800)
committerGui Hecheng <guihecheng@cmss.chinamobile.com>
Thu, 9 Mar 2017 06:21:03 +0000 (14:21 +0800)
When ::getattr returns -ESTALE, rgw_getattr returns ESTALE,
which is a not expected postive.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
src/rgw/rgw_file.cc

index f1d1ef1649d4985bbf56289b31e2ec333695f69b..c935b15de0e4aa2301d40dbbf7cabe5fdaa752b8 100644 (file)
@@ -1494,7 +1494,7 @@ int rgw_getattr(struct rgw_fs *rgw_fs,
   RGWLibFS *fs = static_cast<RGWLibFS*>(rgw_fs->fs_private);
   RGWFileHandle* rgw_fh = get_rgwfh(fh);
 
-  return -(fs->getattr(rgw_fh, st));
+  return fs->getattr(rgw_fh, st);
 }
 
 /*