Inode::cap_is_valid() never returns false in case the
evaluation fails.
Fix for:
CID
1297828 (#1 of 1): Identical code for different branches (IDENTICAL_BRANCHES)
identical_branches: The same code is executed when the condition
cap->session->cap_gen <= cap->gen && ceph_clock_now(this->cct) <
cap->session->cap_ttl is true or false, because the code in the
if-then branch and after the if statement is identical. Should
the if statement be removed?
implicit_else: The code from the above if-then branch is identical
to the code after the if statement.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
&& (ceph_clock_now(cct) < cap->session->cap_ttl)) {
return true;
}
- return true;
+ return false;
}
int Inode::caps_issued(int *implemented)