aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode-map.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index 04f7199facb4..2d0d50067a7b 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -394,6 +394,11 @@ int btrfs_save_ino_cache(struct btrfs_root *root,
394 root->root_key.objectid > BTRFS_LAST_FREE_OBJECTID)) 394 root->root_key.objectid > BTRFS_LAST_FREE_OBJECTID))
395 return 0; 395 return 0;
396 396
397 /* Don't save inode cache if we are deleting this root */
398 if (btrfs_root_refs(&root->root_item) == 0 &&
399 root != root->fs_info->tree_root)
400 return 0;
401
397 path = btrfs_alloc_path(); 402 path = btrfs_alloc_path();
398 if (!path) 403 if (!path)
399 return -ENOMEM; 404 return -ENOMEM;