bcachefs: Use unlikely() in bch2_err_matches()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 29 May 2023 20:27:11 +0000 (16:27 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000 (17:10 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/errcode.h

index acf9b92f9ab0f64e100e8eca81220b12366a085a..12c0c44eb6b0338c0b20569ed24044c24e9e01e8 100644 (file)
@@ -230,7 +230,7 @@ static inline bool _bch2_err_matches(int err, int class)
 #define bch2_err_matches(_err, _class)                 \
 ({                                                     \
        BUILD_BUG_ON(!__builtin_constant_p(_class));    \
-       _bch2_err_matches(_err, _class);                \
+       unlikely(_bch2_err_matches(_err, _class));      \
 })
 
 int __bch2_err_class(int);