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 <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 94cc087 commit 76bdbc7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)