Skip to content

Commit

Permalink
Btrfs: confirmation of value is added before trace_btrfs_get_extent()…
Browse files Browse the repository at this point in the history
… is called

We should confirm the value of extent_map before calling
trace_btrfs_get_extent() because the value of extent_map has the
possibility of NULL.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
  • Loading branch information
Tsutomu Itoh authored and Chris Mason committed Oct 9, 2012
1 parent 18ec90d commit f0bd95e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5505,7 +5505,8 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
write_unlock(&em_tree->lock);
out:

trace_btrfs_get_extent(root, em);
if (em)
trace_btrfs_get_extent(root, em);

if (path)
btrfs_free_path(path);
Expand Down

0 comments on commit f0bd95e

Please sign in to comment.