Skip to content

Commit 2505e27

Browse files
committed
Merge PR ceph#60236 into main
* refs/pull/60236/head: MDS/CDir: return as early as possible from CDir::should_split_fast() Reviewed-by: Patrick Donnelly <[email protected]> Reviewed-by: Dhairya Parmar <[email protected]> Reviewed-by: Venky Shankar <[email protected]>
2 parents 17e86d1 + 27feea1 commit 2505e27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mds/CDir.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3808,10 +3808,13 @@ bool CDir::should_split_fast() const
38083808
const CDentry *dn = p.second;
38093809
if (!dn->get_projected_linkage()->is_null()) {
38103810
effective_size++;
3811+
3812+
if (effective_size > fast_limit) [[unlikely]]
3813+
return true;
38113814
}
38123815
}
38133816

3814-
return effective_size > fast_limit;
3817+
return false;
38153818
}
38163819

38173820
bool CDir::should_merge() const

0 commit comments

Comments
 (0)