]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: fix reversed return value of getattr 14206/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Wed, 8 Mar 2017 08:23:11 +0000 (16:23 +0800)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 28 Mar 2017 19:09:01 +0000 (15:09 -0400)
When ::getattr returns -ESTALE, rgw_getattr returns ESTALE,
which is a not expected postive.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
(cherry picked from commit 39203cf872b8f4af86eb0e4a0f96dffd9cc92b41)

src/rgw/rgw_file.cc

index 5423bebd30a841392a549231062e3b6271fdd9b5..fb49016fd3ce8e187f9796788f826a90194d1bdf 100644 (file)
@@ -1357,7 +1357,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);
 }
 
 /*