Btrfs: Fix async caching interaction with unmount
[linux-2.6-block.git] / fs / btrfs / disk-io.c
index c658397c7473ce194fc9ec8c01c054013dbef09b..3a9b8875988018bd2782f919631f54335de1e0d1 100644 (file)
@@ -2317,6 +2317,9 @@ int close_ctree(struct btrfs_root *root)
                        printk(KERN_ERR "btrfs: commit super ret %d\n", ret);
        }
 
+       fs_info->closing = 2;
+       smp_mb();
+
        if (fs_info->delalloc_bytes) {
                printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n",
                       (unsigned long long)fs_info->delalloc_bytes);