From 422ac142de8f7a3a7e2a2c44d215bc1d539cdb24 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 30 Dec 2021 15:03:35 +0800 Subject: [PATCH] client: remove useless Lx cap check Once here the new_caps must have the 'Ls' caps, the extra check for 'Lsx' makes no sense. Signed-off-by: Xiubo Li --- src/client/Client.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 1f20eedf60d..0af249b43e5 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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) && -- 2.47.3