]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: no need to check mask before calling _getattr in statx 11421/head
authorJeff Layton <jlayton@redhat.com>
Fri, 14 Oct 2016 14:59:27 +0000 (10:59 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 14 Oct 2016 15:00:33 +0000 (11:00 -0400)
If the mask is zero, then the cap check will succeed, "yes" will be
true and we'll end up returning quickly from _getattr anyway.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc

index 5ec790b0469b47af4f1a13d5e56cb3199c0f7528..1284c1679fe8165b94a347a092cdf999e8560d2e 100644 (file)
@@ -6742,12 +6742,10 @@ int Client::statx(const char *relpath, struct ceph_statx *stx,
   if (r < 0)
     return r;
 
-  if (mask && !in->caps_issued_mask(mask)) {
-    r = _getattr(in, mask, perms);
-    if (r < 0) {
-      ldout(cct, 3) << "statx exit on error!" << dendl;
-      return r;
-    }
+  r = _getattr(in, mask, perms);
+  if (r < 0) {
+    ldout(cct, 3) << "statx exit on error!" << dendl;
+    return r;
   }
 
   fill_statx(in, mask, stx);