Message ID | 1387178735-30832-3-git-send-email-bo.li.liu@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index f23b0df..b7fb1a8 100644 --- a/fs/btrfs/inode-map.c +++ b/fs/btrfs/inode-map.c @@ -141,7 +141,9 @@ static void start_caching(struct btrfs_root *root) int ret; u64 objectid; - if (!btrfs_test_opt(root, INODE_MAP_CACHE)) + /* Don't even start if this is an orphan root. */ + if (!btrfs_test_opt(root, INODE_MAP_CACHE) || + btrfs_root_refs(&root->root_item) == 0) return; spin_lock(&root->cache_lock);