diff options
author | David Sterba <dsterba@suse.com> | 2019-06-18 20:00:05 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-02 12:30:50 +0200 |
commit | 2792237d0c4c226c6a6059fefe7f712aa0c94003 (patch) | |
tree | 40421a106abe6b9bf219fb4459207945bfb4844a /fs/btrfs | |
parent | 63611e738a62bfb186a61e4b16b9fb72657144e5 (diff) | |
download | lwn-2792237d0c4c226c6a6059fefe7f712aa0c94003.tar.gz lwn-2792237d0c4c226c6a6059fefe7f712aa0c94003.zip |
btrfs: use common helpers for extent IO state insertion messages
Print the error messages using the helpers that also print the
filesystem identification.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/extent_io.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 464e6b761a9c..932d2e0be8d7 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -522,9 +522,11 @@ static int insert_state(struct extent_io_tree *tree, { struct rb_node *node; - if (end < start) - WARN(1, KERN_ERR "BTRFS: end < start %llu %llu\n", - end, start); + if (end < start) { + btrfs_err(tree->fs_info, + "insert state: end < start %llu %llu", end, start); + WARN_ON(1); + } state->start = start; state->end = end; @@ -534,7 +536,8 @@ static int insert_state(struct extent_io_tree *tree, if (node) { struct extent_state *found; found = rb_entry(node, struct extent_state, rb_node); - pr_err("BTRFS: found node %llu %llu on insert of %llu %llu\n", + btrfs_err(tree->fs_info, + "found node %llu %llu on insert of %llu %llu", found->start, found->end, start, end); return -EEXIST; } |