]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Btrfs: confirmation of value is added before trace_btrfs_get_extent() is called
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Mon, 1 Oct 2012 09:08:37 +0000 (03:08 -0600)
committerChris Mason <chris.mason@fusionio.com>
Thu, 4 Oct 2012 13:40:09 +0000 (09:40 -0400)
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>
fs/btrfs/inode.c

index 50a54b3ef7e678c822acc78ada2c66c4f9369341..2c785c09081e50ae7d99710bcebb916217e36ee3 100644 (file)
@@ -6121,7 +6121,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);