]> Pileus Git - ~andy/linux/commitdiff
Btrfs: don't memset new tokens
authorJosef Bacik <jbacik@fusionio.com>
Mon, 15 Oct 2012 17:39:33 +0000 (13:39 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 17 Dec 2012 01:46:25 +0000 (20:46 -0500)
Our token logic depends on token->kaddr being set, and if it is not it sets
everything properly as needed.  So instead of memsetting just set
token->kaddr to NULL.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/ctree.h

index 55aff6764bb9b4e14824b41b76e74e3a7173974d..cd02205f13c8e8f24daf19ebcd68ca178adfe7a9 100644 (file)
@@ -1860,7 +1860,7 @@ struct btrfs_map_token {
 
 static inline void btrfs_init_map_token (struct btrfs_map_token *token)
 {
-       memset(token, 0, sizeof(*token));
+       token->kaddr = NULL;
 }
 
 /* some macros to generate set/get funcs for the struct fields.  This