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-Tag: v3.7-rc1~71^2~15 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f0bd95ea72644cbf9210606f6f8edfce13d65d47;p=~emulex%2Finfiniband.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 d24b6501461..f92def2467a 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);