From 9109a8f44ecf44edc14300f9b42a34bed655fb5f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 18 Aug 2016 17:44:18 +0200 Subject: btrfs-progs: no BUG_ON in close_ctree There's no reason for it. Signed-off-by: David Sterba --- disk-io.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'disk-io.h') 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); } -- cgit v1.2.3