summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-08-18 17:44:18 +0200
committerDavid Sterba <dsterba@suse.com>2016-08-18 17:44:18 +0200
commit9109a8f44ecf44edc14300f9b42a34bed655fb5f (patch)
tree930ced7c5580f65c768db4d56f2981d979e96ab3
parent87c1bd13c1fca430c3dbf0da62e9aa33bde609c8 (diff)
btrfs-progs: no BUG_ON in close_ctree
There's no reason for it. Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--disk-io.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/disk-io.h b/disk-io.h
index d860ff29..d6fb9822 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -123,7 +123,8 @@ struct btrfs_fs_info *open_ctree_fs_info(const char *filename,
int close_ctree_fs_info(struct btrfs_fs_info *fs_info);
static inline int close_ctree(struct btrfs_root *root)
{
- BUG_ON(!root);
+ if (!root)
+ return 0;
return close_ctree_fs_info(root->fs_info);
}