aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c3
-rw-r--r--fs/btrfs/extent-tree.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index c658397c7473..3a9b88759880 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2317,6 +2317,9 @@ int close_ctree(struct btrfs_root *root)
2317 printk(KERN_ERR "btrfs: commit super ret %d\n", ret); 2317 printk(KERN_ERR "btrfs: commit super ret %d\n", ret);
2318 } 2318 }
2319 2319
2320 fs_info->closing = 2;
2321 smp_mb();
2322
2320 if (fs_info->delalloc_bytes) { 2323 if (fs_info->delalloc_bytes) {
2321 printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n", 2324 printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n",
2322 (unsigned long long)fs_info->delalloc_bytes); 2325 (unsigned long long)fs_info->delalloc_bytes);
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 08188f1615d9..fadf69a2764b 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -288,8 +288,10 @@ again:
288 288
289 while (1) { 289 while (1) {
290 smp_mb(); 290 smp_mb();
291 if (block_group->fs_info->closing) 291 if (block_group->fs_info->closing > 1) {
292 last = (u64)-1;
292 break; 293 break;
294 }
293 295
294 leaf = path->nodes[0]; 296 leaf = path->nodes[0];
295 slot = path->slots[0]; 297 slot = path->slots[0];