diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 6f364e1d8d3d..98b33477235b 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -4111,11 +4111,17 @@ static inline int __btrfs_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag) | |||
4111 | * Call btrfs_abort_transaction as early as possible when an error condition is | 4111 | * Call btrfs_abort_transaction as early as possible when an error condition is |
4112 | * detected, that way the exact line number is reported. | 4112 | * detected, that way the exact line number is reported. |
4113 | */ | 4113 | */ |
4114 | |||
4115 | #define btrfs_abort_transaction(trans, root, errno) \ | 4114 | #define btrfs_abort_transaction(trans, root, errno) \ |
4116 | do { \ | 4115 | do { \ |
4117 | __btrfs_abort_transaction(trans, root, __func__, \ | 4116 | /* Report first abort since mount */ \ |
4118 | __LINE__, errno); \ | 4117 | if (!test_and_set_bit(BTRFS_FS_STATE_TRANS_ABORTED, \ |
4118 | &((root)->fs_info->fs_state))) { \ | ||
4119 | WARN(1, KERN_DEBUG \ | ||
4120 | "BTRFS: Transaction aborted (error %d)\n", \ | ||
4121 | (errno)); \ | ||
4122 | } \ | ||
4123 | __btrfs_abort_transaction((trans), (root), __func__, \ | ||
4124 | __LINE__, (errno)); \ | ||
4119 | } while (0) | 4125 | } while (0) |
4120 | 4126 | ||
4121 | #define btrfs_std_error(fs_info, errno) \ | 4127 | #define btrfs_std_error(fs_info, errno) \ |