summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2012-09-18 17:52:32 +0400
committerChris Mason <chris.mason@fusionio.com>2012-10-09 04:09:02 +0400
commit005d6427ac4f276d937a36ca6a1d62b181ed70bf (patch)
treea17de085350c5137e669774f0a810010997b95de /fs/btrfs/ctree.h
parent8732d44f806a9da9a7ca4d1704b8a1ed81639bc4 (diff)
downloadlinux-005d6427ac4f276d937a36ca6a1d62b181ed70bf.tar.xz
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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1372057e1ec1..399521ab61da 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__, \