]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: remove useless Lx cap check 44427/head
authorXiubo Li <xiubli@redhat.com>
Thu, 30 Dec 2021 07:03:35 +0000 (15:03 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 13 Jan 2022 12:46:17 +0000 (20:46 +0800)
Once here the new_caps must have the 'Ls' caps, the extra check
for 'Lsx' makes no sense.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc

index 1f20eedf60dae8f204a9e9cc4986e90fdc39296a..0af249b43e51ba6fca924c0393cdb701f486b17a 100644 (file)
@@ -5452,8 +5452,7 @@ void Client::handle_cap_grant(MetaSession *session, Inode *in, Cap *cap, const M
   if ((new_caps & CEPH_CAP_LINK_SHARED) &&
       !(issued & CEPH_CAP_LINK_EXCL)) {
     in->nlink = m->head.nlink;
-    if (in->nlink == 0 &&
-       (new_caps & (CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL)))
+    if (in->nlink == 0)
       deleted_inode = true;
   }
   if (!(issued & CEPH_CAP_XATTR_EXCL) &&