Skip to content

Commit 493611e

Browse files
Christoph Hellwigdjwong
authored andcommitted
xfs: extsize hints are not unlikely in xfs_bmap_btalloc
With COW files they are the hotpath, just like for files with the extent size hint attribute. We really shouldn't micro-manage anything but failure cases with unlikely. Additionally Arnd Bergmann recently reported that one of these two unlikely annotations causes link failures together with an upcoming kernel instrumentation patch, so let's get rid of it ASAP. Signed-off-by: Christoph Hellwig <[email protected]> Reported-by: Arnd Bergmann <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 5a93790 commit 493611e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3629,7 +3629,7 @@ xfs_bmap_btalloc(
36293629
align = xfs_get_cowextsz_hint(ap->ip);
36303630
else if (xfs_alloc_is_userdata(ap->datatype))
36313631
align = xfs_get_extsz_hint(ap->ip);
3632-
if (unlikely(align)) {
3632+
if (align) {
36333633
error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
36343634
align, 0, ap->eof, 0, ap->conv,
36353635
&ap->offset, &ap->length);
@@ -3701,7 +3701,7 @@ xfs_bmap_btalloc(
37013701
args.minlen = ap->minlen;
37023702
}
37033703
/* apply extent size hints if obtained earlier */
3704-
if (unlikely(align)) {
3704+
if (align) {
37053705
args.prod = align;
37063706
if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
37073707
args.mod = (xfs_extlen_t)(args.prod - args.mod);

0 commit comments

Comments
 (0)