summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2022-01-06 09:35:52 +0800
committerIlya Dryomov <idryomov@gmail.com>2022-01-13 13:40:07 +0100
commit76bdbc7ac777adb6bc316bfe3f57b3de93c50985 (patch)
tree551ac93de28c2e4e84eac4aec5027d066d1c74d5 /fs/ceph/caps.c
parent94cc0877cad0bc6ca84686c4fa874bf530eb8b88 (diff)
downloadlinux-76bdbc7ac777adb6bc316bfe3f57b3de93c50985.tar.gz
linux-76bdbc7ac777adb6bc316bfe3f57b3de93c50985.tar.bz2
linux-76bdbc7ac777adb6bc316bfe3f57b3de93c50985.zip
ceph: remove redundant Lsx caps check
The newcaps has already included the Ls, no need to check it again. Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index c447fa2e2d1f..62448691608f 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -3375,8 +3375,7 @@ static void handle_cap_grant(struct inode *inode,
if ((newcaps & CEPH_CAP_LINK_SHARED) &&
(extra_info->issued & CEPH_CAP_LINK_EXCL) == 0) {
set_nlink(inode, le32_to_cpu(grant->nlink));
- if (inode->i_nlink == 0 &&
- (newcaps & (CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL)))
+ if (inode->i_nlink == 0)
deleted_inode = true;
}