Skip to content

Commit 76bdbc7

Browse files
lxbszidryomov
authored andcommitted
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>
1 parent 94cc087 commit 76bdbc7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/ceph/caps.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3375,8 +3375,7 @@ static void handle_cap_grant(struct inode *inode,
33753375
if ((newcaps & CEPH_CAP_LINK_SHARED) &&
33763376
(extra_info->issued & CEPH_CAP_LINK_EXCL) == 0) {
33773377
set_nlink(inode, le32_to_cpu(grant->nlink));
3378-
if (inode->i_nlink == 0 &&
3379-
(newcaps & (CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL)))
3378+
if (inode->i_nlink == 0)
33803379
deleted_inode = true;
33813380
}
33823381

0 commit comments

Comments
 (0)