]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove duplicated calls to getattr
authorzhangweibing <zhangweibing@unitedstack.com>
Fri, 26 Aug 2016 02:49:48 +0000 (10:49 +0800)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 5 Oct 2016 18:25:55 +0000 (14:25 -0400)
Signed-off-by: Weibing Zhang <zhangweibing@unitedstack.com>
(cherry picked from commit 87b550ed2fba472d4ef2e1f771bb5f9fd248804f)

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

index 918b9425524016e68b71a2f6dbcdde0ccaeaa499..b24060b39c8448e39cd3e6590671fc8b66a83d9d 100644 (file)
@@ -1329,12 +1329,6 @@ int rgw_getattr(struct rgw_fs *rgw_fs,
   RGWLibFS *fs = static_cast<RGWLibFS*>(rgw_fs->fs_private);
   RGWFileHandle* rgw_fh = get_rgwfh(fh);
 
-  int rc = -(fs->getattr(rgw_fh, st));
-  if (rc != 0) {
-    // do it again
-    rc = -(fs->getattr(rgw_fh, st));
-  }
-
   return -(fs->getattr(rgw_fh, st));
 }