diff mbox series

ceph: remove redundant Lsx caps check

Message ID 20220106013552.1141633-1-xiubli@redhat.com
State New
Headers show
Series ceph: remove redundant Lsx caps check | expand

Commit Message

Xiubo Li Jan. 6, 2022, 1:35 a.m. UTC
From: Xiubo Li <xiubli@redhat.com>

The newcaps has already included the Ls, no need to check it again.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
 fs/ceph/caps.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 1f1a1c6987ce..d68f04ec147d 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -3451,8 +3451,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;
 	}