aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-02 02:56:09 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-04 03:47:12 -0500
commit29f96b7e9023929f8bd80b5e1f53d4e6db3c434f (patch)
treee9d3b13d0d33ae67cece6079897257240a8f5544 /fs
parentaab858dabd5ee4df1d8876449db2ef7868d1b5d0 (diff)
xfs: extsize hints are not unlikely in xfs_bmap_btalloc
commit 493611ebd62673f39e2f52c2561182c558a21cb6 upstream. 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 <hch@lst.de> Reported-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index fbb60d30089c..f52fd63fce19 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -3720,7 +3720,7 @@ xfs_bmap_btalloc(
3720 align = xfs_get_cowextsz_hint(ap->ip); 3720 align = xfs_get_cowextsz_hint(ap->ip);
3721 else if (xfs_alloc_is_userdata(ap->datatype)) 3721 else if (xfs_alloc_is_userdata(ap->datatype))
3722 align = xfs_get_extsz_hint(ap->ip); 3722 align = xfs_get_extsz_hint(ap->ip);
3723 if (unlikely(align)) { 3723 if (align) {
3724 error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, 3724 error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
3725 align, 0, ap->eof, 0, ap->conv, 3725 align, 0, ap->eof, 0, ap->conv,
3726 &ap->offset, &ap->length); 3726 &ap->offset, &ap->length);
@@ -3792,7 +3792,7 @@ xfs_bmap_btalloc(
3792 args.minlen = ap->minlen; 3792 args.minlen = ap->minlen;
3793 } 3793 }
3794 /* apply extent size hints if obtained earlier */ 3794 /* apply extent size hints if obtained earlier */
3795 if (unlikely(align)) { 3795 if (align) {
3796 args.prod = align; 3796 args.prod = align;
3797 if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod))) 3797 if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
3798 args.mod = (xfs_extlen_t)(args.prod - args.mod); 3798 args.mod = (xfs_extlen_t)(args.prod - args.mod);