From: Tsutomu Itoh Date: Mon, 1 Oct 2012 09:08:37 +0000 (-0600) Subject: Btrfs: confirmation of value is added before trace_btrfs_get_extent() is called X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=f0bd95ea72644cbf9210606f6f8edfce13d65d47;p=deliverable%2Flinux.git Btrfs: confirmation of value is added before trace_btrfs_get_extent() 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 --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d24b65014612..f92def2467a6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5505,7 +5505,8 @@ insert: 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);