Message ID | 20220106013552.1141633-1-xiubli@redhat.com |
---|---|
State | New |
Headers | show |
Series | ceph: remove redundant Lsx caps check | expand |
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; }