diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-28 16:14:06 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-21 01:36:20 -0500 |
| commit | 052210c3fa1f8a964942cd71cb479b339537c69b (patch) | |
| tree | cd565e3f84b9c93d5f9113909dfc86dde3dff7a1 /fs/bcachefs/error.h | |
| parent | cfba90aba9fb858488ad035ce041f2fbda5e20f9 (diff) | |
bcachefs: Don't error out when logging fsck error
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.h')
| -rw-r--r-- | fs/bcachefs/error.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/bcachefs/error.h b/fs/bcachefs/error.h index 3b278f28e56b..12ca5287e20a 100644 --- a/fs/bcachefs/error.h +++ b/fs/bcachefs/error.h @@ -45,12 +45,11 @@ int bch2_topology_error(struct bch_fs *); bch2_inconsistent_error(c); \ }) -#define bch2_fs_inconsistent_on(cond, c, ...) \ +#define bch2_fs_inconsistent_on(cond, ...) \ ({ \ bool _ret = unlikely(!!(cond)); \ - \ if (_ret) \ - bch2_fs_inconsistent(c, __VA_ARGS__); \ + bch2_fs_inconsistent(__VA_ARGS__); \ _ret; \ }) @@ -146,8 +145,13 @@ void bch2_flush_fsck_errs(struct bch_fs *); #define log_fsck_err(c, _err_type, ...) \ __fsck_err(c, FSCK_CAN_IGNORE, _err_type, __VA_ARGS__) -#define log_fsck_err_on(cond, c, _err_type, ...) \ - __fsck_err_on(cond, c, FSCK_CAN_IGNORE, _err_type, __VA_ARGS__) +#define log_fsck_err_on(cond, ...) \ +({ \ + bool _ret = unlikely(!!(cond)); \ + if (_ret) \ + log_fsck_err(__VA_ARGS__); \ + _ret; \ +}) enum bch_validate_flags; __printf(5, 6) |
