diff options
Diffstat (limited to 'fs/btrfs')
| -rw-r--r-- | fs/btrfs/disk-io.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1b03f8393a69..4bdb0528688a 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -1987,30 +1987,33 @@ static void free_root_pointers(struct btrfs_fs_info *info, int chunk_root) | |||
| 1987 | { | 1987 | { |
| 1988 | free_extent_buffer(info->tree_root->node); | 1988 | free_extent_buffer(info->tree_root->node); |
| 1989 | free_extent_buffer(info->tree_root->commit_root); | 1989 | free_extent_buffer(info->tree_root->commit_root); |
| 1990 | free_extent_buffer(info->dev_root->node); | ||
| 1991 | free_extent_buffer(info->dev_root->commit_root); | ||
| 1992 | free_extent_buffer(info->extent_root->node); | ||
| 1993 | free_extent_buffer(info->extent_root->commit_root); | ||
| 1994 | free_extent_buffer(info->csum_root->node); | ||
| 1995 | free_extent_buffer(info->csum_root->commit_root); | ||
| 1996 | if (info->quota_root) { | ||
| 1997 | free_extent_buffer(info->quota_root->node); | ||
| 1998 | free_extent_buffer(info->quota_root->commit_root); | ||
| 1999 | } | ||
| 2000 | |||
| 2001 | info->tree_root->node = NULL; | 1990 | info->tree_root->node = NULL; |
| 2002 | info->tree_root->commit_root = NULL; | 1991 | info->tree_root->commit_root = NULL; |
| 2003 | info->dev_root->node = NULL; | 1992 | |
| 2004 | info->dev_root->commit_root = NULL; | 1993 | if (info->dev_root) { |
| 2005 | info->extent_root->node = NULL; | 1994 | free_extent_buffer(info->dev_root->node); |
| 2006 | info->extent_root->commit_root = NULL; | 1995 | free_extent_buffer(info->dev_root->commit_root); |
| 2007 | info->csum_root->node = NULL; | 1996 | info->dev_root->node = NULL; |
| 2008 | info->csum_root->commit_root = NULL; | 1997 | info->dev_root->commit_root = NULL; |
| 1998 | } | ||
| 1999 | if (info->extent_root) { | ||
| 2000 | free_extent_buffer(info->extent_root->node); | ||
| 2001 | free_extent_buffer(info->extent_root->commit_root); | ||
| 2002 | info->extent_root->node = NULL; | ||
| 2003 | info->extent_root->commit_root = NULL; | ||
| 2004 | } | ||
| 2005 | if (info->csum_root) { | ||
| 2006 | free_extent_buffer(info->csum_root->node); | ||
| 2007 | free_extent_buffer(info->csum_root->commit_root); | ||
| 2008 | info->csum_root->node = NULL; | ||
| 2009 | info->csum_root->commit_root = NULL; | ||
| 2010 | } | ||
| 2009 | if (info->quota_root) { | 2011 | if (info->quota_root) { |
| 2012 | free_extent_buffer(info->quota_root->node); | ||
| 2013 | free_extent_buffer(info->quota_root->commit_root); | ||
| 2010 | info->quota_root->node = NULL; | 2014 | info->quota_root->node = NULL; |
| 2011 | info->quota_root->commit_root = NULL; | 2015 | info->quota_root->commit_root = NULL; |
| 2012 | } | 2016 | } |
| 2013 | |||
| 2014 | if (chunk_root) { | 2017 | if (chunk_root) { |
| 2015 | free_extent_buffer(info->chunk_root->node); | 2018 | free_extent_buffer(info->chunk_root->node); |
| 2016 | free_extent_buffer(info->chunk_root->commit_root); | 2019 | free_extent_buffer(info->chunk_root->commit_root); |
