diff options
author | David Sterba <dsterba@suse.cz> | 2012-09-18 07:52:32 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-08 20:09:02 -0400 |
commit | 005d6427ac4f276d937a36ca6a1d62b181ed70bf (patch) | |
tree | a17de085350c5137e669774f0a810010997b95de /fs/btrfs/ctree.h | |
parent | 8732d44f806a9da9a7ca4d1704b8a1ed81639bc4 (diff) | |
download | linux-3.10-005d6427ac4f276d937a36ca6a1d62b181ed70bf.tar.gz linux-3.10-005d6427ac4f276d937a36ca6a1d62b181ed70bf.tar.bz2 linux-3.10-005d6427ac4f276d937a36ca6a1d62b181ed70bf.zip |
btrfs: move transaction aborts to the point of failure
Call btrfs_abort_transaction as early as possible when an error
condition is detected, that way the line number reported is useful
and we're not clueless anymore which error path led to the abort.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 1372057e1ec..399521ab61d 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3400,6 +3400,11 @@ static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, } } +/* + * Call btrfs_abort_transaction as early as possible when an error condition is + * detected, that way the exact line number is reported. + */ + #define btrfs_abort_transaction(trans, root, errno) \ do { \ __btrfs_abort_transaction(trans, root, __func__, \ |